From c1628561d1dc74ec0818a5368b857559567be083 Mon Sep 17 00:00:00 2001 From: zihzhan Date: Tue, 25 May 2021 13:59:59 -0700 Subject: [PATCH 01/17] Adding Communication CallingServer API preview1. --- custom-words.txt | 2 + .../communicationservicescallingserver.json | 1272 +++++++++++++++++ .../data-plane/CallingServer/readme.csharp.md | 15 + .../data-plane/CallingServer/readme.md | 55 + 4 files changed, 1344 insertions(+) create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/communicationservicescallingserver.json create mode 100644 specification/communication/data-plane/CallingServer/readme.csharp.md create mode 100644 specification/communication/data-plane/CallingServer/readme.md diff --git a/custom-words.txt b/custom-words.txt index 21d328170955..004ca5db6907 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1427,6 +1427,7 @@ provisioningservices provisioningState Psec PSNR +pstn ptrdname publicipaddresses publicpreview @@ -1804,6 +1805,7 @@ streamingendpoint streamingjobs streamingservice subcause +subcode subcomponent subcomponents subdir 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 new file mode 100644 index 000000000000..a39b6dc7ef59 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/communicationservicescallingserver.json @@ -0,0 +1,1272 @@ +{ + "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/CreateCallRequest" + } + }, + { + "$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/PlayAudioRequest" + } + }, + { + "$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}/CancelMediaProcessing": { + "post": { + "tags": [ + "Call" + ], + "summary": "Cancel Media Processing.", + "description": "Cancel Media Processing.", + "operationId": "Call_CancelMediaProcessing", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "callId", + "in": "path", + "description": "The call id", + "required": true, + "type": "string" + }, + { + "name": "request", + "in": "body", + "description": "The cancel media processing request.", + "required": true, + "schema": { + "$ref": "#/definitions/CancelMediaProcessingRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the cancel media processing response.", + "schema": { + "$ref": "#/definitions/CancelMediaProcessingResponse" + } + }, + "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/JoinCallRequest" + } + }, + { + "$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/InviteParticipantsRequest" + } + }, + { + "$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/InviteParticipantsRequest" + } + }, + { + "$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/StartCallRecordingRequest" + } + }, + { + "$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": { + "CallModality": { + "enum": [ + "audio", + "video" + ], + "type": "string", + "x-ms-enum": { + "name": "CallModality", + "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", + "requestedModalities", + "requestedCallEvents" + ], + "type": "object", + "properties": { + "sourceAlternateIdentity": { + "$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" + }, + "requestedModalities": { + "description": "The requested modalities.", + "type": "array", + "items": { + "$ref": "#/definitions/CallModality" + } + }, + "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" + }, + "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" + }, + "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" + } + } + }, + "OperationStatus": { + "description": "Gets or sets the status of the operation", + "enum": [ + "notStarted", + "running", + "completed", + "failed" + ], + "type": "string", + "x-ms-enum": { + "name": "OperationStatus", + "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/OperationStatus" + }, + "operationContext": { + "description": "Gets or sets the operation context", + "type": "string" + }, + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "Gets or sets the result info" + } + } + }, + "ResultInfo": { + "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" + } + } + }, + "CancelMediaProcessingRequest": { + "description": "The request payload for cancel media processing", + "type": "object", + "properties": { + "operationContext": { + "description": "The context for this operation.", + "type": "string" + } + } + }, + "CancelMediaProcessingResponse": { + "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/OperationStatus" + }, + "operationContext": { + "description": "Gets or sets the operation context", + "type": "string" + }, + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "Gets or sets the result info" + } + } + }, + "JoinCallRequest": { + "description": "The request payload for join call.", + "required": [ + "source", + "callbackUri", + "requestedModalities", + "requestedCallEvents" + ], + "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" + }, + "requestedModalities": { + "description": "The requested modalities.", + "type": "array", + "items": { + "$ref": "#/definitions/CallModality" + } + }, + "requestedCallEvents": { + "description": "The requested call events to subscribe to.", + "type": "array", + "items": { + "$ref": "#/definitions/EventSubscriptionType" + } + } + } + }, + "JoinCallResponse": { + "description": "The response payload of the join call operation.", + "type": "object", + "properties": { + "callLegId": { + "description": "Call leg id of the call.", + "type": "string" + } + } + }, + "InviteParticipantsRequest": { + "description": "The invite participants request.", + "required": [ + "participants" + ], + "type": "object", + "properties": { + "alternateCallerId": { + "$ref": "#/definitions/PhoneNumberIdentifier", + "description": "The alternate identity of source participant." + }, + "participants": { + "description": "The list of participants to be added to the call.", + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationIdentifier" + } + }, + "operationContext": { + "description": "The operation context.", + "type": "string" + }, + "callbackUri": { + "description": "The callback URI.", + "type": "string" + } + } + }, + "StartCallRecordingRequest": { + "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" + } + } + }, + "CallRecordingState": { + "description": "The recording state of the recording", + "enum": [ + "active", + "inactive" + ], + "type": "string", + "x-ms-enum": { + "name": "CallRecordingState", + "modelAsString": true + } + }, + "GetCallRecordingStateResponse": { + "description": "The response payload of get call recording state operation.", + "type": "object", + "properties": { + "recordingState": { + "$ref": "#/definitions/CallRecordingState" + } + } + } + }, + "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" + } + ] + } +} diff --git a/specification/communication/data-plane/CallingServer/readme.csharp.md b/specification/communication/data-plane/CallingServer/readme.csharp.md new file mode 100644 index 000000000000..41ceb968d271 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/readme.csharp.md @@ -0,0 +1,15 @@ +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.CommunicationServices + output-folder: $(csharp-sdks-folder)/communicationservices/management/Microsoft.CommunicationServices/GeneratedProtocol +``` diff --git a/specification/communication/data-plane/CallingServer/readme.md b/specification/communication/data-plane/CallingServer/readme.md new file mode 100644 index 000000000000..526514ee5e9d --- /dev/null +++ b/specification/communication/data-plane/CallingServer/readme.md @@ -0,0 +1,55 @@ +# communicationservices + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for communicationservices. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the communicationservices. + +```yaml +openapi-type: data-plane +tag: package-2021-04-15-preview1 +``` + +### Tag: package-2021-04-15-preview1 + +These settings apply only when `--tag=package-2021-04-15-preview1` is specified on the command line. + +```yaml $(tag) == 'package-2021-04-15-preview1' +input-file: + - preview/2021-04-15-preview1/communicationservicescallingserver.json +title: + Azure Communication Services +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) + From 02dc6a72ac1a0186ec8325aecfe98c3ae848df39 Mon Sep 17 00:00:00 2001 From: Paresh Arvind Patil Date: Thu, 27 May 2021 19:29:59 -0700 Subject: [PATCH 02/17] Updated the Swagger to add PlayAudio api for out-call scenario (#14578) * Updated the servercalling swagger with playAudio api for out-call * Fixed a typo Co-authored-by: Paresh Arvind Patil --- .../communicationservicescallingserver.json | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) 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 a39b6dc7ef59..4ea37dcb785c 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 @@ -380,6 +380,72 @@ } } }, + "/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/PlayAudioRequest" + } + }, + { + "$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": [ @@ -1034,6 +1100,10 @@ "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" } } }, From 3081720bfa8a45588dd0cb170d5d07c4766066cb Mon Sep 17 00:00:00 2001 From: zihzhan Date: Fri, 28 May 2021 11:34:36 -0700 Subject: [PATCH 03/17] Add preview0 swagger for .net sdk. --- .../communicationservicescallingserver.json | 1253 +++++++++++++++++ .../examples/Call_CreateCall.json | 0 .../examples/Call_CreateCall.json | 0 .../data-plane/CallingServer/readme.md | 13 +- 4 files changed, 1265 insertions(+), 1 deletion(-) create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/examples/Call_CreateCall.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/examples/Call_CreateCall.json diff --git a/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json new file mode 100644 index 000000000000..1cdb3ad6d6d8 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json @@ -0,0 +1,1253 @@ +{ + "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/CreateCallRequest" + } + }, + { + "$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/PlayAudioRequest" + } + }, + { + "$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/JoinCallRequest" + } + }, + { + "$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/InviteParticipantsRequest" + } + }, + { + "$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/InviteParticipantsRequest" + } + }, + { + "$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/StartCallRecordingRequest" + } + }, + { + "$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": { + "CallModality": { + "enum": [ + "audio", + "video" + ], + "type": "string", + "x-ms-enum": { + "name": "CallModality", + "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", + "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/CallModality" + } + }, + "requestedCallEvents": { + "description": "The requested call events to subscribe to.", + "type": "array", + "items": { + "$ref": "#/definitions/EventSubscriptionType" + } + } + } + }, + "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" + }, + "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" + } + } + }, + "OperationStatus": { + "description": "Gets or sets the status of the operation", + "enum": [ + "notStarted", + "running", + "completed", + "failed" + ], + "type": "string", + "x-ms-enum": { + "name": "OperationStatus", + "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/OperationStatus" + }, + "operationContext": { + "description": "Gets or sets the operation context", + "type": "string" + }, + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "Gets or sets the result info" + } + } + }, + "ResultInfo": { + "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/OperationStatus" + }, + "operationContext": { + "description": "Gets or sets the operation context", + "type": "string" + }, + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "Gets or sets the result info" + } + } + }, + "JoinCallRequest": { + "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/CallModality" + } + }, + "requestedCallEvents": { + "description": "The requested call events to subscribe to.", + "type": "array", + "items": { + "$ref": "#/definitions/EventSubscriptionType" + } + } + } + }, + "JoinCallResponse": { + "description": "The response payload of the join call operation.", + "type": "object", + "properties": { + "callLegId": { + "description": "Call leg id of the call.", + "type": "string" + } + } + }, + "InviteParticipantsRequest": { + "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" + } + } + }, + "StartCallRecordingRequest": { + "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" + } + } + }, + "CallRecordingState": { + "description": "The recording state of the recording", + "enum": [ + "active", + "inactive" + ], + "type": "string", + "x-ms-enum": { + "name": "CallRecordingState", + "modelAsString": true + } + }, + "GetCallRecordingStateResponse": { + "description": "The response payload of get call recording state operation.", + "type": "object", + "properties": { + "recordingState": { + "$ref": "#/definitions/CallRecordingState" + } + } + } + }, + "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" + } + ] + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/examples/Call_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/examples/Call_CreateCall.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/examples/Call_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/examples/Call_CreateCall.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/specification/communication/data-plane/CallingServer/readme.md b/specification/communication/data-plane/CallingServer/readme.md index 526514ee5e9d..92040af064b2 100644 --- a/specification/communication/data-plane/CallingServer/readme.md +++ b/specification/communication/data-plane/CallingServer/readme.md @@ -26,7 +26,18 @@ These are the global settings for the communicationservices. ```yaml openapi-type: data-plane -tag: package-2021-04-15-preview1 +tag: package-2021-03-28-preview0 +``` + +### Tag: package-2021-03-28-preview0 + +These settings apply only when `--tag=package-2021-03-28-preview0` is specified on the command line. + +```yaml $(tag) == 'package-2021-03-28-preview0' +input-file: + - preview/2021-03-28-preview0/communicationservicescallingserver.json +title: + Azure Communication Services ``` ### Tag: package-2021-04-15-preview1 From 4f3481d102a19c47a3f2af3f0ba637cfb80ed935 Mon Sep 17 00:00:00 2001 From: zihzhan Date: Fri, 28 May 2021 12:51:24 -0700 Subject: [PATCH 04/17] Update SDK Swagger preview0 --- .../communicationservicescallingserver.json | 2434 ++++++++--------- 1 file changed, 1217 insertions(+), 1217 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json index 1cdb3ad6d6d8..c10ed283737a 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json @@ -1,1253 +1,1253 @@ { - "swagger": "2.0", - "info": { - "version": "2021-04-15-preview1", - "title": "Azure Communication CallingServer Service", - "description": "Azure Communication CallingServer Service" + "swagger":"2.0", + "info":{ + "version":"2021-03-28-preview0", + "title":"Azure Communication CallingServer Service", + "description":"Azure Communication CallingServer Service" }, - "schemes": [ - "https" + "schemes":[ + "https" ], - "consumes": [ - "application/json" + "consumes":[ + "application/json" ], - "produces": [ - "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/CreateCallRequest" - } - }, - { - "$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 - } + "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" } - } - }, - "/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 - } + ], + "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}": { - "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}/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" } - } - }, - "/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/PlayAudioRequest" - } - }, - { - "$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 - } + ], + "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}/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/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" } - } - }, - "/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/JoinCallRequest" - } - }, - { - "$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 - } + ], + "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/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/InviteParticipantsRequest" - } - }, - { - "$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}/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" } - } - }, - "/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 - } + ], + "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}/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/InviteParticipantsRequest" - } - }, - { - "$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}/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" } - } - }, - "/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 - } + ], + "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}/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/StartCallRecordingRequest" - } - }, - { - "$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}/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" } - } - }, - "/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 - } + ], + "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 } - }, - "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}/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" } - } - }, - "/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 - } + ], + "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}/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 - } + } + } + }, + "/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" } - } - } - }, - "definitions": { - "CallModality": { - "enum": [ - "audio", - "video" - ], - "type": "string", - "x-ms-enum": { - "name": "CallModality", - "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", - "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/CallModality" - } - }, - "requestedCallEvents": { - "description": "The requested call events to subscribe to.", - "type": "array", - "items": { - "$ref": "#/definitions/EventSubscriptionType" - } + ], + "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 } - } - }, - "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" + } + } + }, + "/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" } - } - }, - "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" - }, - "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" + ], + "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" } - } - }, - "OperationStatus": { - "description": "Gets or sets the status of the operation", - "enum": [ - "notStarted", - "running", - "completed", - "failed" - ], - "type": "string", - "x-ms-enum": { - "name": "OperationStatus", - "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/OperationStatus" - }, - "operationContext": { - "description": "Gets or sets the operation context", - "type": "string" - }, - "resultInfo": { - "$ref": "#/definitions/ResultInfo", - "description": "Gets or sets the result info" + ], + "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 } - } - }, - "ResultInfo": { - "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" + } + } + }, + "/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" } - } - }, - "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/OperationStatus" - }, - "operationContext": { - "description": "Gets or sets the operation context", - "type": "string" - }, - "resultInfo": { - "$ref": "#/definitions/ResultInfo", - "description": "Gets or sets the result info" + ], + "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 } - } - }, - "JoinCallRequest": { - "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/CallModality" - } - }, - "requestedCallEvents": { - "description": "The requested call events to subscribe to.", - "type": "array", - "items": { - "$ref": "#/definitions/EventSubscriptionType" - } + } + }, + "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" } - } - }, - "JoinCallResponse": { - "description": "The response payload of the join call operation.", - "type": "object", - "properties": { - "callLegId": { - "description": "Call leg id of the call.", - "type": "string" + }, + "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" } - } - }, - "InviteParticipantsRequest": { - "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" + }, + "requestedCallEvents":{ + "description":"The requested call events to subscribe to.", + "type":"array", + "items":{ + "$ref":"#/definitions/EventSubscriptionTypeModel" } - } - }, - "StartCallRecordingRequest": { - "description": "The request payload start call recording operation.", - "type": "object", - "properties": { - "recordingStateCallbackUri": { - "description": "The uri to send notifications to.", - "type": "string" + } + } + }, + "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" } - } - }, - "StartCallRecordingResponse": { - "description": "The response payload of start call recording operation.", - "type": "object", - "properties": { - "recordingId": { - "description": "The recording id of the started recording", - "type": "string" + }, + "requestedCallEvents":{ + "description":"The requested call events to subscribe to.", + "type":"array", + "items":{ + "$ref":"#/definitions/EventSubscriptionTypeModel" } - } - }, - "CallRecordingState": { - "description": "The recording state of the recording", - "enum": [ - "active", - "inactive" - ], - "type": "string", - "x-ms-enum": { - "name": "CallRecordingState", - "modelAsString": true - } - }, - "GetCallRecordingStateResponse": { - "description": "The response payload of get call recording state operation.", - "type": "object", - "properties": { - "recordingState": { - "$ref": "#/definitions/CallRecordingState" + } + } + }, + "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" - } + "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" - } - ] + "x-ms-parameterized-host":{ + "hostTemplate":"{endpoint}", + "useSchemePrefix":false, + "parameters":[ + { + "$ref":"#/parameters/Endpoint" + } + ] } } From f5df5d9c6a1ddd1da567f19a7f9cf5fe8946938d Mon Sep 17 00:00:00 2001 From: zihzhan Date: Fri, 28 May 2021 20:15:30 -0700 Subject: [PATCH 05/17] Update swagger api version. --- .../communicationservicescallingserver.json | 1253 -------- .../communicationservicescallingserver.json | 2519 ++++++++--------- .../communicationservicescallingserver.json | 1342 +++++++++ .../examples/Call_CreateCall.json | 0 .../data-plane/CallingServer/readme.md | 16 +- 5 files changed, 2565 insertions(+), 2565 deletions(-) delete mode 100644 specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/communicationservicescallingserver.json rename specification/communication/data-plane/CallingServer/preview/{2021-03-28-preview0 => 2021-05-28-preview2}/examples/Call_CreateCall.json (100%) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json deleted file mode 100644 index c10ed283737a..000000000000 --- a/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/communicationservicescallingserver.json +++ /dev/null @@ -1,1253 +0,0 @@ -{ - "swagger":"2.0", - "info":{ - "version":"2021-03-28-preview0", - "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" - } - ] - } -} 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 4ea37dcb785c..86c937180e07 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,1342 +1,1253 @@ { - "swagger": "2.0", - "info": { - "version": "2021-04-15-preview1", - "title": "Azure Communication CallingServer Service", - "description": "Azure Communication CallingServer Service" + "swagger":"2.0", + "info":{ + "version":"2021-04-15-preview1", + "title":"Azure Communication CallingServer Service", + "description":"Azure Communication CallingServer Service" }, - "schemes": [ - "https" + "schemes":[ + "https" ], - "consumes": [ - "application/json" + "consumes":[ + "application/json" ], - "produces": [ - "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/CreateCallRequest" - } - }, - { - "$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 - } + "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}/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}":{ + "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/PlayAudioRequest" - } - }, - { - "$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}/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}/CancelMediaProcessing": { - "post": { - "tags": [ - "Call" - ], - "summary": "Cancel Media Processing.", - "description": "Cancel Media Processing.", - "operationId": "Call_CancelMediaProcessing", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "callId", - "in": "path", - "description": "The call id", - "required": true, - "type": "string" - }, - { - "name": "request", - "in": "body", - "description": "The cancel media processing request.", - "required": true, - "schema": { - "$ref": "#/definitions/CancelMediaProcessingRequest" - } - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Returns the cancel media processing response.", - "schema": { - "$ref": "#/definitions/CancelMediaProcessingResponse" - } - }, - "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/JoinCallRequest" - } - }, - { - "$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}/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/PlayAudioRequest" - } - }, - { - "$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": { - "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/InviteParticipantsRequest" - } - }, - { - "$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/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": { - "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/InviteParticipantsRequest" - } - }, - { - "$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/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": { - "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/StartCallRecordingRequest" - } - }, - { - "$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}": { - "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 - } + }, + "/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 + } + } } - }, - "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}/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 + } + } } - } - }, - "/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 - } + } + }, + "definitions":{ + "CallModalityModel":{ + "enum":[ + "audio", + "video" + ], + "type":"string", + "x-ms-enum":{ + "name":"CallModalityModel", + "modelAsString":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 - } + }, + "EventSubscriptionTypeModel":{ + "enum":[ + "participantsUpdated", + "dtmfReceived" + ], + "type":"string", + "x-ms-enum":{ + "name":"EventSubscriptionTypeModel", + "modelAsString":true } - } - } - }, - "definitions": { - "CallModality": { - "enum": [ - "audio", - "video" - ], - "type": "string", - "x-ms-enum": { - "name": "CallModality", - "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", - "requestedModalities", - "requestedCallEvents" - ], - "type": "object", - "properties": { - "sourceAlternateIdentity": { - "$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" - }, - "requestedModalities": { - "description": "The requested modalities.", - "type": "array", - "items": { - "$ref": "#/definitions/CallModality" - } - }, - "requestedCallEvents": { - "description": "The requested call events to subscribe to.", - "type": "array", - "items": { - "$ref": "#/definitions/EventSubscriptionType" - } + }, + "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" + } + } } - } - }, - "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" - }, - "CreateCallResponse": { - "description": "The response payload of the create call operation.", - "type": "object", - "properties": { - "callLegId": { - "description": "Call leg id of the call.", - "type": "string" + }, + "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": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationError" - }, - "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" + }, + "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" + } } - } - }, - "OperationStatus": { - "description": "Gets or sets the status of the operation", - "enum": [ - "notStarted", - "running", - "completed", - "failed" - ], - "type": "string", - "x-ms-enum": { - "name": "OperationStatus", - "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/OperationStatus" - }, - "operationContext": { - "description": "Gets or sets the operation context", - "type": "string" - }, - "resultInfo": { - "$ref": "#/definitions/ResultInfo", - "description": "Gets or sets the result info" + }, + "OperationStatusModel":{ + "description":"Gets or sets the status of the operation", + "enum":[ + "notStarted", + "running", + "completed", + "failed" + ], + "type":"string", + "x-ms-enum":{ + "name":"OperationStatusModel", + "modelAsString":true } - } - }, - "ResultInfo": { - "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" + }, + "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" + } } - } - }, - "CancelMediaProcessingRequest": { - "description": "The request payload for cancel media processing", - "type": "object", - "properties": { - "operationContext": { - "description": "The context for this operation.", - "type": "string" + }, + "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" + } } - } - }, - "CancelMediaProcessingResponse": { - "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/OperationStatus" - }, - "operationContext": { - "description": "Gets or sets the operation context", - "type": "string" - }, - "resultInfo": { - "$ref": "#/definitions/ResultInfo", - "description": "Gets or sets the result info" + }, + "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" + } } - } - }, - "JoinCallRequest": { - "description": "The request payload for join call.", - "required": [ - "source", - "callbackUri", - "requestedModalities", - "requestedCallEvents" - ], - "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" - }, - "requestedModalities": { - "description": "The requested modalities.", - "type": "array", - "items": { - "$ref": "#/definitions/CallModality" - } - }, - "requestedCallEvents": { - "description": "The requested call events to subscribe to.", - "type": "array", - "items": { - "$ref": "#/definitions/EventSubscriptionType" - } + }, + "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" + }, + "JoinCallResponse":{ + "description":"The response payload of the join call operation.", + "type":"object", + "properties":{ + "callLegId":{ + "description":"Call leg id of the call.", + "type":"string" + } } - } - }, - "InviteParticipantsRequest": { - "description": "The invite participants request.", - "required": [ - "participants" - ], - "type": "object", - "properties": { - "alternateCallerId": { - "$ref": "#/definitions/PhoneNumberIdentifier", - "description": "The alternate identity of source participant." - }, - "participants": { - "description": "The list of participants to be added to the call.", - "type": "array", - "items": { - "$ref": "#/definitions/CommunicationIdentifier" - } - }, - "operationContext": { - "description": "The operation context.", - "type": "string" - }, - "callbackUri": { - "description": "The callback URI.", - "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" + } } - } - }, - "StartCallRecordingRequest": { - "description": "The request payload start call recording operation.", - "type": "object", - "properties": { - "recordingStateCallbackUri": { - "description": "The uri to send notifications to.", - "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" + }, + "StartCallRecordingResponse":{ + "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 recording state of the recording", - "enum": [ - "active", - "inactive" - ], - "type": "string", - "x-ms-enum": { - "name": "CallRecordingState", - "modelAsString": true - } - }, - "GetCallRecordingStateResponse": { - "description": "The response payload of get call recording state operation.", - "type": "object", - "properties": { - "recordingState": { - "$ref": "#/definitions/CallRecordingState" + }, + "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" - } + "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" - } - ] + "x-ms-parameterized-host":{ + "hostTemplate":"{endpoint}", + "useSchemePrefix":false, + "parameters":[ + { + "$ref":"#/parameters/Endpoint" + } + ] } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/communicationservicescallingserver.json new file mode 100644 index 000000000000..7d0cedc3a7ab --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/communicationservicescallingserver.json @@ -0,0 +1,1342 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-05-28-preview2", + "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/CreateCallRequest" + } + }, + { + "$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/PlayAudioRequest" + } + }, + { + "$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}/CancelMediaProcessing": { + "post": { + "tags": [ + "Call" + ], + "summary": "Cancel Media Processing.", + "description": "Cancel Media Processing.", + "operationId": "Call_CancelMediaProcessing", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "callId", + "in": "path", + "description": "The call id", + "required": true, + "type": "string" + }, + { + "name": "request", + "in": "body", + "description": "The cancel media processing request.", + "required": true, + "schema": { + "$ref": "#/definitions/CancelMediaProcessingRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the cancel media processing response.", + "schema": { + "$ref": "#/definitions/CancelMediaProcessingResponse" + } + }, + "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/JoinCallRequest" + } + }, + { + "$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/PlayAudioRequest" + } + }, + { + "$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/InviteParticipantsRequest" + } + }, + { + "$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/InviteParticipantsRequest" + } + }, + { + "$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/StartCallRecordingRequest" + } + }, + { + "$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": { + "CallModality": { + "enum": [ + "audio", + "video" + ], + "type": "string", + "x-ms-enum": { + "name": "CallModality", + "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", + "requestedModalities", + "requestedCallEvents" + ], + "type": "object", + "properties": { + "sourceAlternateIdentity": { + "$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" + }, + "requestedModalities": { + "description": "The requested modalities.", + "type": "array", + "items": { + "$ref": "#/definitions/CallModality" + } + }, + "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" + }, + "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" + }, + "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": "Gets or sets the status of the operation", + "enum": [ + "notStarted", + "running", + "completed", + "failed" + ], + "type": "string", + "x-ms-enum": { + "name": "OperationStatus", + "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/OperationStatus" + }, + "operationContext": { + "description": "Gets or sets the operation context", + "type": "string" + }, + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "Gets or sets the result info" + } + } + }, + "ResultInfo": { + "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" + } + } + }, + "CancelMediaProcessingRequest": { + "description": "The request payload for cancel media processing", + "type": "object", + "properties": { + "operationContext": { + "description": "The context for this operation.", + "type": "string" + } + } + }, + "CancelMediaProcessingResponse": { + "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/OperationStatus" + }, + "operationContext": { + "description": "Gets or sets the operation context", + "type": "string" + }, + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "Gets or sets the result info" + } + } + }, + "JoinCallRequest": { + "description": "The request payload for join call.", + "required": [ + "source", + "callbackUri", + "requestedModalities", + "requestedCallEvents" + ], + "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" + }, + "requestedModalities": { + "description": "The requested modalities.", + "type": "array", + "items": { + "$ref": "#/definitions/CallModality" + } + }, + "requestedCallEvents": { + "description": "The requested call events to subscribe to.", + "type": "array", + "items": { + "$ref": "#/definitions/EventSubscriptionType" + } + } + } + }, + "JoinCallResponse": { + "description": "The response payload of the join call operation.", + "type": "object", + "properties": { + "callLegId": { + "description": "Call leg id of the call.", + "type": "string" + } + } + }, + "InviteParticipantsRequest": { + "description": "The invite participants request.", + "required": [ + "participants" + ], + "type": "object", + "properties": { + "alternateCallerId": { + "$ref": "#/definitions/PhoneNumberIdentifier", + "description": "The alternate identity of source participant." + }, + "participants": { + "description": "The list of participants to be added to the call.", + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationIdentifier" + } + }, + "operationContext": { + "description": "The operation context.", + "type": "string" + }, + "callbackUri": { + "description": "The callback URI.", + "type": "string" + } + } + }, + "StartCallRecordingRequest": { + "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" + } + } + }, + "CallRecordingState": { + "description": "The recording state of the recording", + "enum": [ + "active", + "inactive" + ], + "type": "string", + "x-ms-enum": { + "name": "CallRecordingState", + "modelAsString": true + } + }, + "GetCallRecordingStateResponse": { + "description": "The response payload of get call recording state operation.", + "type": "object", + "properties": { + "recordingState": { + "$ref": "#/definitions/CallRecordingState" + } + } + } + }, + "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" + } + ] + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/examples/Call_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/examples/Call_CreateCall.json similarity index 100% rename from specification/communication/data-plane/CallingServer/preview/2021-03-28-preview0/examples/Call_CreateCall.json rename to specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/examples/Call_CreateCall.json diff --git a/specification/communication/data-plane/CallingServer/readme.md b/specification/communication/data-plane/CallingServer/readme.md index 92040af064b2..3d4f232aa8c8 100644 --- a/specification/communication/data-plane/CallingServer/readme.md +++ b/specification/communication/data-plane/CallingServer/readme.md @@ -26,27 +26,27 @@ These are the global settings for the communicationservices. ```yaml openapi-type: data-plane -tag: package-2021-03-28-preview0 +tag: package-2021-04-15-preview1 ``` -### Tag: package-2021-03-28-preview0 +### Tag: package-2021-04-15-preview1 -These settings apply only when `--tag=package-2021-03-28-preview0` is specified on the command line. +These settings apply only when `--tag=package-2021-04-15-preview1` is specified on the command line. -```yaml $(tag) == 'package-2021-03-28-preview0' +```yaml $(tag) == 'package-2021-04-15-preview1' input-file: - - preview/2021-03-28-preview0/communicationservicescallingserver.json + - preview/2021-04-15-preview1/communicationservicescallingserver.json title: Azure Communication Services ``` -### Tag: package-2021-04-15-preview1 +### Tag: package-2021-05-28-preview2 -These settings apply only when `--tag=package-2021-04-15-preview1` is specified on the command line. +These settings apply only when `--tag=package-2021-05-28-preview2` is specified on the command line. ```yaml $(tag) == 'package-2021-04-15-preview1' input-file: - - preview/2021-04-15-preview1/communicationservicescallingserver.json + - preview/2021-05-28-preview2/communicationservicescallingserver.json title: Azure Communication Services ``` From 1d36d17a6bb4d5dd098f47df1d4f46799bde0d5d Mon Sep 17 00:00:00 2001 From: zihzhan Date: Mon, 31 May 2021 15:41:22 -0700 Subject: [PATCH 06/17] Update swagger api version. --- .../communicationservicescallingserver.json | 2572 +++++++++-------- 1 file changed, 1321 insertions(+), 1251 deletions(-) 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" + } + ] + } } From 9550e58c98dc0af9474d896493335bf0543b2b4d Mon Sep 17 00:00:00 2001 From: navali-msft <66667092+navali-msft@users.noreply.github.com> Date: Wed, 2 Jun 2021 13:03:05 -0700 Subject: [PATCH 07/17] Removed Model and Internal postfix, added events in swagger (#14639) * Removed Model and Internal postfix, added events in swagger * update the title --- .../communicationservicescallingserver.json | 2764 +++++++++-------- 1 file changed, 1483 insertions(+), 1281 deletions(-) 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 947542ad0e4c..4512a893b818 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,1323 +1,1525 @@ { - "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 - } + "swagger": "2.0", + "info": { + "version": "2021-04-15-preview1", + "title": "Azure Communication Calling Server Service", + "description": "Azure Communication Calling Server 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/CreateCallRequest" } - } - }, - "/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 - } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "201": { + "description": "Returns the create call response.", + "schema": { + "$ref": "#/definitions/CreateCallResponse" } - } - }, - "/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 - } - } - } + }, + "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 + } + } } - }, - "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" + }, + "/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" }, - "targets":{ - "description":"The targets of the call.", - "type":"array", - "items":{ - "$ref":"#/definitions/CommunicationIdentifierModel" - } + "x-ms-error-response": true + }, + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "source":{ - "$ref":"#/definitions/CommunicationIdentifierModel", - "description":"The source of the call." + "x-ms-error-response": true + }, + "500": { + "description": "Internal server error.", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "subject":{ - "description":"The subject.", - "type":"string" + "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" }, - "callbackUri":{ - "description":"The callback URI.", - "type":"string" + "x-ms-error-response": true + }, + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "requestedModalities":{ - "description":"The requested modalities.", - "type":"array", - "items":{ - "$ref":"#/definitions/CallModalityModel" - } + "x-ms-error-response": true + }, + "500": { + "description": "Internal server error.", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "requestedCallEvents":{ - "description":"The requested call events to subscribe to.", - "type":"array", - "items":{ - "$ref":"#/definitions/EventSubscriptionTypeModel" - } + "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/PlayAudioRequest" } - } - }, - "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" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the play audio response.", + "schema": { + "$ref": "#/definitions/PlayAudioResponse" } - } - }, - "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" + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "operationContext":{ - "description":"The value to identify context of the operation.", - "type":"string" + "x-ms-error-response": true + }, + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "audioFileId":{ - "description":"An id for the media in the AudioFileUri, using which we cache the media resource.", - "type":"string" + "x-ms-error-response": true + }, + "500": { + "description": "Internal server error.", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "callbackUri":{ - "description":"The callback Uri to receive PlayAudio status notifications.", - "type":"string" + "x-ms-error-response": true + } + } + } + }, + "/calling/calls/{callId}/CancelMediaProcessing": { + "post": { + "tags": [ + "Call" + ], + "summary": "Cancel Media Processing.", + "description": "Cancel Media Processing.", + "operationId": "Call_CancelAllMediaOperations", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "callId", + "in": "path", + "description": "The call id", + "required": true, + "type": "string" + }, + { + "name": "request", + "in": "body", + "description": "The cancel media processing request.", + "required": true, + "schema": { + "$ref": "#/definitions/CancelAllMediaOperationsRequest" } - } - }, - "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" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the cancel media processing response.", + "schema": { + "$ref": "#/definitions/CancelAllMediaOperationsResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "status":{ - "$ref":"#/definitions/OperationStatusModel" + "x-ms-error-response": true + }, + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "operationContext":{ - "description":"Gets or sets the operation context", - "type":"string" + "x-ms-error-response": true + }, + "500": { + "description": "Internal server error.", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "resultInfo":{ - "$ref":"#/definitions/ResultInfoInternal", - "description":"Gets or sets the result info" + "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/JoinCallRequest" } - } - }, - "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" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the join call response.", + "schema": { + "$ref": "#/definitions/JoinCallResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "subcode":{ - "format":"int32", - "description":"Gets or sets the result subcode.\r\nThe subcode further classifies a failure. For example.", - "type":"integer" + "x-ms-error-response": true + }, + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "message":{ - "description":"Gets or sets the message\r\nThe message is a detail explanation of subcode.", - "type":"string" + "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/PlayAudioRequest" } - } - }, - "CancelMediaOperationsResponse":{ - "description":"The response payload of the cancel media processing operation.", - "type":"object", - "properties":{ - "id":{ - "description":"Gets or sets the identifier.", - "type":"string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the play audio response.", + "schema": { + "$ref": "#/definitions/PlayAudioResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "status":{ - "$ref":"#/definitions/OperationStatusModel" + "x-ms-error-response": true + }, + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "operationContext":{ - "description":"Gets or sets the operation context", - "type":"string" + "x-ms-error-response": true + }, + "500": { + "description": "Internal server error.", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "resultInfo":{ - "$ref":"#/definitions/ResultInfoInternal", - "description":"Gets or sets the result info" + "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/InviteParticipantsRequest" } - } - }, - "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." + }, + { + "$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" }, - "subject":{ - "description":"The subject.", - "type":"string" + "x-ms-error-response": true + }, + "500": { + "description": "Internal server error.", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "callbackUri":{ - "description":"The callback URI.", - "type":"string" + "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" }, - "requestedModalities":{ - "description":"The requested modalities.", - "type":"array", - "items":{ - "$ref":"#/definitions/CallModalityModel" - } + "x-ms-error-response": true + }, + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "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" + "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/InviteParticipantsRequest" } - } - }, - "InviteParticipantsRequestInternal":{ - "description":"The invite participants request.", - "required":[ - "participants" - ], - "type":"object", - "properties":{ - "alternateCallerId":{ - "$ref":"#/definitions/PhoneNumberIdentifierModel", - "description":"The alternate identity of source participant." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the invite participants response." + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "participants":{ - "description":"The list of participants to be added to the call.", - "type":"array", - "items":{ - "$ref":"#/definitions/CommunicationIdentifierModel" - } + "x-ms-error-response": true + }, + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/CommunicationError" }, - "operationContext":{ - "description":"The operation context.", - "type":"string" + "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" }, - "callbackUri":{ - "description":"The callback URI.", - "type":"string" + "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/StartCallRecordingRequest" } - } - }, - "StartCallRecordingRequestInternal":{ - "description":"The request payload start call recording operation.", - "type":"object", - "properties":{ - "recordingStateCallbackUri":{ - "description":"The uri to send notifications to.", - "type":"string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the start call recording response.", + "schema": { + "$ref": "#/definitions/StartCallRecordingResponse" } - } - }, - "StartCallRecordingResponse":{ - "description":"The response payload of start call recording operation.", - "type":"object", - "properties":{ - "recordingId":{ - "description":"The recording id of the started recording", - "type":"string" + }, + "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" } - } - }, - "CallRecordingStateModel":{ - "description":"The recording state of the recording", - "enum":[ - "active", - "inactive" - ], - "type":"string", - "x-ms-enum":{ - "name":"CallRecordingStateModel", - "modelAsString":true - } + }, + "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 + } + } }, - "GetCallRecordingStateResponse":{ - "description":"The response payload of get call recording state operation.", - "type":"object", - "properties":{ - "recordingState":{ - "$ref":"#/definitions/CallRecordingStateModel" - } - } + "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 + } + } } - }, - "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" + }, + "/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": { + "CallModality": { + "enum": [ + "audio", + "video" + ], + "type": "string", + "x-ms-enum": { + "name": "CallModality", + "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", + "requestedModalities", + "requestedCallEvents" + ], + "type": "object", + "properties": { + "sourceAlternateIdentity": { + "$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" + }, + "requestedModalities": { + "description": "The requested modalities.", + "type": "array", + "items": { + "$ref": "#/definitions/CallModality" + } + }, + "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" + }, + "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" + }, + "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": "Gets or sets the status of the operation", + "enum": [ + "notStarted", + "running", + "completed", + "failed" + ], + "type": "string", + "x-ms-enum": { + "name": "OperationStatus", + "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/OperationStatus" + }, + "operationContext": { + "description": "Gets or sets the operation context", + "type": "string" + }, + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "Gets or sets the result info" + } + } + }, + "ResultInfo": { + "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" + } + } + }, + "CancelAllMediaOperationsRequest": { + "description": "The request payload for cancel media processing", + "type": "object", + "properties": { + "operationContext": { + "description": "The context for this operation.", + "type": "string" + } + } + }, + "CancelAllMediaOperationsResponse": { + "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/OperationStatus" + }, + "operationContext": { + "description": "Gets or sets the operation context", + "type": "string" + }, + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "Gets or sets the result info" + } + } + }, + "JoinCallRequest": { + "description": "The request payload for join call.", + "required": [ + "source", + "callbackUri", + "requestedModalities", + "requestedCallEvents" + ], + "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" + }, + "requestedModalities": { + "description": "The requested modalities.", + "type": "array", + "items": { + "$ref": "#/definitions/CallModality" + } + }, + "requestedCallEvents": { + "description": "The requested call events to subscribe to.", + "type": "array", + "items": { + "$ref": "#/definitions/EventSubscriptionType" + } + } + } + }, + "JoinCallResponse": { + "description": "The response payload of the join call operation.", + "type": "object", + "properties": { + "callLegId": { + "description": "Call leg id of the call.", + "type": "string" + } + } + }, + "InviteParticipantsRequest": { + "description": "The invite participants request.", + "required": [ + "participants" + ], + "type": "object", + "properties": { + "alternateCallerId": { + "$ref": "#/definitions/PhoneNumberIdentifier", + "description": "The alternate identity of source participant." + }, + "participants": { + "description": "The list of participants to be added to the call.", + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationIdentifier" + } + }, + "operationContext": { + "description": "The operation context.", + "type": "string" + }, + "callbackUri": { + "description": "The callback URI.", + "type": "string" + } + } + }, + "StartCallRecordingRequest": { + "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" + } + } + }, + "CallRecordingState": { + "description": "The recording state of the recording", + "enum": [ + "active", + "inactive" + ], + "type": "string", + "x-ms-enum": { + "name": "CallRecordingState", + "modelAsString": true + } + }, + "GetCallRecordingStateResponse": { + "description": "The response payload of get call recording state operation.", + "type": "object", + "properties": { + "recordingState": { + "$ref": "#/definitions/CallRecordingState" + } + } + }, + "CallState": { + "description": "The call state.", + "enum": [ + "unknown", + "idle", + "incoming", + "establishing", + "established", + "hold", + "unhold", + "transferring", + "redirecting", + "terminating", + "terminated" + ], + "type": "string", + "x-ms-enum": { + "name": "CallState", + "modelAsString": true + } + }, + "CallLegStateChangedEvent": { + "description": "The call state change event.", + "type": "object", + "properties": { + "conversationId": { + "description": "The conversation.id.", + "type": "string" + }, + "callLegId": { + "description": "The call leg.id.", + "type": "string" + }, + "callState": { + "$ref": "#/definitions/CallState" + } + } + }, + "CallRecordingStateChangeEvent": { + "description": "The call recording state change event.", + "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" + }, + "conversationId": { + "description": "The conversation id from a out call start recording request", + "type": "string" + } + } + }, + "InviteParticipantsResultEvent": { + "type": "object", + "properties": { + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "The result details." + }, + "operationContext": { + "description": "The operation context.", + "type": "string" + }, + "status": { + "$ref": "#/definitions/OperationStatus" + } + } + }, + "ParticipantsUpdatedEvent": { + "description": "Class to represent roster update", + "type": "object", + "properties": { + "callLegId": { + "description": "The call leg.id.", + "type": "string" + }, + "participants": { + "description": "The list of participants", + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationParticipant" + } + } + } + }, + "CommunicationParticipant": { + "description": "Class to represent entry in roster", + "type": "object", + "properties": { + "identifier": { + "$ref": "#/definitions/CommunicationIdentifier", + "description": "ACS communication identifier" + }, + "participantId": { + "description": "Participant Id", + "type": "string" + }, + "isMuted": { + "description": "Is participant muted", + "type": "boolean" + } + } + }, + "PlayAudioResultEvent": { + "description": "The play audio result event.", + "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", + "type": "object", + "properties": { + "toneInfo": { + "$ref": "#/definitions/ToneInfo", + "description": "The tone info." + }, + "callLegId": { + "description": "The call leg.id.", + "type": "string" + } + } + }, + "ToneValue": { + "description": "Gets or sets the tone detected.", + "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": "Gets or sets the tone info", + "type": "object", + "properties": { + "sequenceId": { + "format": "int32", + "description": "Gets or sets the sequence id. This id can be used to determine if the same tone \r\nwas played multiple times or if any tones were missed.", + "type": "integer" + }, + "tone": { + "$ref": "#/definitions/ToneValue" + } + } + } + }, + "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" } - }, - "x-ms-parameterized-host":{ - "hostTemplate":"{endpoint}", - "useSchemePrefix":false, - "parameters":[ - { - "$ref":"#/parameters/Endpoint" - } - ] - } + ] + } } From 37acfb43a99ac90f6cb986f227a34bcfbccd6c5b Mon Sep 17 00:00:00 2001 From: navali-msft <66667092+navali-msft@users.noreply.github.com> Date: Tue, 8 Jun 2021 14:42:56 -0700 Subject: [PATCH 08/17] Add swagger for version 2021-06-15 (#14720) * Updated swagger with version 2021-06-15 * Fix the Communication.Common definitions path * Removed old swagger --- .../communicationservicescallingserver.json | 1342 ----------------- .../examples/Call_CreateCall.json | 0 .../communicationservicescallingserver.json | 556 +++---- .../examples/Call_CreateCall.json | 0 4 files changed, 249 insertions(+), 1649 deletions(-) delete mode 100644 specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/communicationservicescallingserver.json delete mode 100644 specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/examples/Call_CreateCall.json rename specification/communication/data-plane/CallingServer/preview/{2021-04-15-preview1 => 2021-06-15-preview}/communicationservicescallingserver.json (84%) rename specification/communication/data-plane/CallingServer/preview/{2021-04-15-preview1 => 2021-06-15-preview}/examples/Call_CreateCall.json (100%) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/communicationservicescallingserver.json deleted file mode 100644 index 7d0cedc3a7ab..000000000000 --- a/specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/communicationservicescallingserver.json +++ /dev/null @@ -1,1342 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2021-05-28-preview2", - "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/CreateCallRequest" - } - }, - { - "$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/PlayAudioRequest" - } - }, - { - "$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}/CancelMediaProcessing": { - "post": { - "tags": [ - "Call" - ], - "summary": "Cancel Media Processing.", - "description": "Cancel Media Processing.", - "operationId": "Call_CancelMediaProcessing", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "callId", - "in": "path", - "description": "The call id", - "required": true, - "type": "string" - }, - { - "name": "request", - "in": "body", - "description": "The cancel media processing request.", - "required": true, - "schema": { - "$ref": "#/definitions/CancelMediaProcessingRequest" - } - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Returns the cancel media processing response.", - "schema": { - "$ref": "#/definitions/CancelMediaProcessingResponse" - } - }, - "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/JoinCallRequest" - } - }, - { - "$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/PlayAudioRequest" - } - }, - { - "$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/InviteParticipantsRequest" - } - }, - { - "$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/InviteParticipantsRequest" - } - }, - { - "$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/StartCallRecordingRequest" - } - }, - { - "$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": { - "CallModality": { - "enum": [ - "audio", - "video" - ], - "type": "string", - "x-ms-enum": { - "name": "CallModality", - "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", - "requestedModalities", - "requestedCallEvents" - ], - "type": "object", - "properties": { - "sourceAlternateIdentity": { - "$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" - }, - "requestedModalities": { - "description": "The requested modalities.", - "type": "array", - "items": { - "$ref": "#/definitions/CallModality" - } - }, - "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" - }, - "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" - }, - "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": "Gets or sets the status of the operation", - "enum": [ - "notStarted", - "running", - "completed", - "failed" - ], - "type": "string", - "x-ms-enum": { - "name": "OperationStatus", - "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/OperationStatus" - }, - "operationContext": { - "description": "Gets or sets the operation context", - "type": "string" - }, - "resultInfo": { - "$ref": "#/definitions/ResultInfo", - "description": "Gets or sets the result info" - } - } - }, - "ResultInfo": { - "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" - } - } - }, - "CancelMediaProcessingRequest": { - "description": "The request payload for cancel media processing", - "type": "object", - "properties": { - "operationContext": { - "description": "The context for this operation.", - "type": "string" - } - } - }, - "CancelMediaProcessingResponse": { - "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/OperationStatus" - }, - "operationContext": { - "description": "Gets or sets the operation context", - "type": "string" - }, - "resultInfo": { - "$ref": "#/definitions/ResultInfo", - "description": "Gets or sets the result info" - } - } - }, - "JoinCallRequest": { - "description": "The request payload for join call.", - "required": [ - "source", - "callbackUri", - "requestedModalities", - "requestedCallEvents" - ], - "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" - }, - "requestedModalities": { - "description": "The requested modalities.", - "type": "array", - "items": { - "$ref": "#/definitions/CallModality" - } - }, - "requestedCallEvents": { - "description": "The requested call events to subscribe to.", - "type": "array", - "items": { - "$ref": "#/definitions/EventSubscriptionType" - } - } - } - }, - "JoinCallResponse": { - "description": "The response payload of the join call operation.", - "type": "object", - "properties": { - "callLegId": { - "description": "Call leg id of the call.", - "type": "string" - } - } - }, - "InviteParticipantsRequest": { - "description": "The invite participants request.", - "required": [ - "participants" - ], - "type": "object", - "properties": { - "alternateCallerId": { - "$ref": "#/definitions/PhoneNumberIdentifier", - "description": "The alternate identity of source participant." - }, - "participants": { - "description": "The list of participants to be added to the call.", - "type": "array", - "items": { - "$ref": "#/definitions/CommunicationIdentifier" - } - }, - "operationContext": { - "description": "The operation context.", - "type": "string" - }, - "callbackUri": { - "description": "The callback URI.", - "type": "string" - } - } - }, - "StartCallRecordingRequest": { - "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" - } - } - }, - "CallRecordingState": { - "description": "The recording state of the recording", - "enum": [ - "active", - "inactive" - ], - "type": "string", - "x-ms-enum": { - "name": "CallRecordingState", - "modelAsString": true - } - }, - "GetCallRecordingStateResponse": { - "description": "The response payload of get call recording state operation.", - "type": "object", - "properties": { - "recordingState": { - "$ref": "#/definitions/CallRecordingState" - } - } - } - }, - "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" - } - ] - } -} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/examples/Call_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-05-28-preview2/examples/Call_CreateCall.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json similarity index 84% rename from specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/communicationservicescallingserver.json rename to specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json index 4512a893b818..a18debac4212 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/communicationservicescallingserver.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2021-04-15-preview1", + "version": "2021-06-15-preview", "title": "Azure Communication Calling Server Service", "description": "Azure Communication Calling Server Service" }, @@ -15,14 +15,14 @@ "application/json" ], "paths": { - "/calling/calls": { + "/calling/callConnections": { "post": { "tags": [ - "Call" + "CallConnection" ], "summary": "Create a new call.", "description": "Create a new call.", - "operationId": "Call_CreateCall", + "operationId": "CallConnection_CreateCall", "consumes": [ "application/json" ], @@ -74,14 +74,14 @@ } } }, - "/calling/calls/{callId}/Hangup": { + "/calling/callConnections/{callConnectionId}/:hangup": { "post": { "tags": [ - "Call" + "CallConnection" ], "summary": "Hangup a call.", "description": "Hangup a call.", - "operationId": "Call_HangupCall", + "operationId": "CallConnection_HangupCall", "consumes": [ "application/json" ], @@ -90,9 +90,9 @@ ], "parameters": [ { - "name": "callId", + "name": "callConnectionId", "in": "path", - "description": "Call id.", + "description": "The call connection id.", "required": true, "type": "string" }, @@ -128,68 +128,14 @@ } } }, - "/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": { + "/calling/callConnections/{callConnectionId}/:playAudio": { "post": { "tags": [ - "Call" + "CallConnection" ], "summary": "Play audio in a call.", "description": "Play audio in a call.", - "operationId": "Call_PlayAudio", + "operationId": "CallConnection_PlayAudio", "consumes": [ "application/json" ], @@ -198,9 +144,9 @@ ], "parameters": [ { - "name": "callId", + "name": "callConnectionId", "in": "path", - "description": "The call id.", + "description": "The call connection id.", "required": true, "type": "string" }, @@ -248,14 +194,14 @@ } } }, - "/calling/calls/{callId}/CancelMediaProcessing": { + "/calling/callConnections/{callConnectionId}/:cancelAllMediaOperations": { "post": { "tags": [ - "Call" + "CallConnection" ], - "summary": "Cancel Media Processing.", - "description": "Cancel Media Processing.", - "operationId": "Call_CancelAllMediaOperations", + "summary": "Cancel all media operations.", + "description": "Cancel all media operations.", + "operationId": "CallConnection_CancelAllMediaOperations", "consumes": [ "application/json" ], @@ -264,16 +210,16 @@ ], "parameters": [ { - "name": "callId", + "name": "callConnectionId", "in": "path", - "description": "The call id", + "description": "The call connection id", "required": true, "type": "string" }, { - "name": "request", + "name": "cancelAllMediaOperationRequest", "in": "body", - "description": "The cancel media processing request.", + "description": "The cancel all media operations context.", "required": true, "schema": { "$ref": "#/definitions/CancelAllMediaOperationsRequest" @@ -285,7 +231,7 @@ ], "responses": { "200": { - "description": "Returns the cancel media processing response.", + "description": "Returns the cancel all media operations response.", "schema": { "$ref": "#/definitions/CancelAllMediaOperationsResponse" } @@ -314,14 +260,14 @@ } } }, - "/calling/conversations/{conversationId}/Join": { + "/calling/serverCalls/{serverCallId}/participants": { "post": { "tags": [ - "Call" + "ServerCall" ], - "summary": "Join a call.", - "description": "Join a call.", - "operationId": "Conversation_JoinCall", + "summary": "Invite participants to the call.", + "description": "Invite participants to the call.", + "operationId": "ServerCall_InviteParticipants", "consumes": [ "application/json" ], @@ -330,19 +276,19 @@ ], "parameters": [ { - "name": "conversationId", + "name": "serverCallId", "in": "path", - "description": "The conversation id which can be guid or encoded cs url", + "description": "The server call id.", "required": true, "type": "string" }, { - "name": "callRequest", + "name": "inviteParticipantsRequest", "in": "body", - "description": "The join call request.", + "description": "The invite participant request.", "required": true, "schema": { - "$ref": "#/definitions/JoinCallRequest" + "$ref": "#/definitions/InviteParticipantsRequest" } }, { @@ -351,10 +297,7 @@ ], "responses": { "202": { - "description": "Returns the join call response.", - "schema": { - "$ref": "#/definitions/JoinCallResponse" - } + "description": "Returns the invite participants response." }, "401": { "description": "Unauthorized", @@ -380,14 +323,14 @@ } } }, - "/calling/conversations/{conversationId}/PlayAudio": { - "post": { + "/calling/serverCalls/{serverCallId}/participants/{participantId}": { + "delete": { "tags": [ - "Call" + "ServerCall" ], - "summary": "Play audio in a call.", - "description": "Play audio in a call.", - "operationId": "Conversation_PlayAudio", + "summary": "Remove participant from the call.", + "description": "Remove participant from the call.", + "operationId": "ServerCall_RemoveParticipant", "consumes": [ "application/json" ], @@ -396,20 +339,18 @@ ], "parameters": [ { - "name": "conversationId", + "name": "serverCallId", "in": "path", - "description": "The conversation id which can be guid or encoded cs url", + "description": "Server call id.", "required": true, "type": "string" }, { - "name": "request", - "in": "body", - "description": "Play audio request.", + "name": "participantId", + "in": "path", + "description": "Participant id.", "required": true, - "schema": { - "$ref": "#/definitions/PlayAudioRequest" - } + "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -417,10 +358,7 @@ ], "responses": { "202": { - "description": "Returns the play audio response.", - "schema": { - "$ref": "#/definitions/PlayAudioResponse" - } + "description": "Returns the remove participant response." }, "401": { "description": "Unauthorized", @@ -446,14 +384,14 @@ } } }, - "/calling/conversations/{conversationId}/participants": { + "/calling/callConnections/{callConnectionId}/participants": { "post": { "tags": [ - "Participant" + "CallConnection" ], "summary": "Invite participants to the call.", "description": "Invite participants to the call.", - "operationId": "Conversation_InviteParticipants", + "operationId": "CallConnection_InviteParticipants", "consumes": [ "application/json" ], @@ -462,9 +400,9 @@ ], "parameters": [ { - "name": "conversationId", + "name": "callConnectionId", "in": "path", - "description": "Conversation id.", + "description": "The call connection id.", "required": true, "type": "string" }, @@ -509,14 +447,14 @@ } } }, - "/calling/conversations/{conversationId}/participants/{participantId}": { + "/calling/callConnections/{callConnectionId}/participants/{participantId}": { "delete": { "tags": [ - "Participant" + "CallConnection" ], "summary": "Remove participant from the call.", "description": "Remove participant from the call.", - "operationId": "Conversation_RemoveParticipant", + "operationId": "CallConnection_RemoveParticipant", "consumes": [ "application/json" ], @@ -525,16 +463,16 @@ ], "parameters": [ { - "name": "conversationId", + "name": "callConnectionId", "in": "path", - "description": "Conversation id.", + "description": "The call connection id.", "required": true, "type": "string" }, { "name": "participantId", "in": "path", - "description": "Participant id.", + "description": "The participant id.", "required": true, "type": "string" }, @@ -570,14 +508,13 @@ } } }, - "/calling/calls/{callId}/participants": { + "/calling/serverCalls/{serverCallId}/recordings": { "post": { "tags": [ - "Participant" + "Recording" ], - "summary": "Invite participants to the call.", - "description": "Invite participants to the call.", - "operationId": "Call_InviteParticipants", + "summary": "Start call recording request.", + "operationId": "ServerCall_StartRecording", "consumes": [ "application/json" ], @@ -586,19 +523,19 @@ ], "parameters": [ { - "name": "callId", + "name": "serverCallId", "in": "path", - "description": "Call id.", + "description": "The server call id.", "required": true, "type": "string" }, { - "name": "inviteParticipantsRequest", + "name": "request", "in": "body", - "description": "Invite participant request.", + "description": "The request body of start call recording request.", "required": true, "schema": { - "$ref": "#/definitions/InviteParticipantsRequest" + "$ref": "#/definitions/StartCallRecordingRequest" } }, { @@ -606,18 +543,21 @@ } ], "responses": { - "202": { - "description": "Returns the invite participants response." + "200": { + "description": "Returns the start call recording response.", + "schema": { + "$ref": "#/definitions/StartCallRecordingResponse" + } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad request", "schema": { "$ref": "#/definitions/CommunicationError" }, "x-ms-error-response": true }, - "400": { - "description": "Bad request", + "404": { + "description": "Not found.", "schema": { "$ref": "#/definitions/CommunicationError" }, @@ -633,14 +573,13 @@ } } }, - "/calling/calls/{callId}/participants/{participantId}": { - "delete": { + "/calling/serverCalls/{serverCallId}/recordings/{recordingId}": { + "get": { "tags": [ - "Participant" + "Recording" ], - "summary": "Remove participant from the call.", - "description": "Remove participant from the call.", - "operationId": "Call_RemoveParticipant", + "summary": "Get call recording state.", + "operationId": "ServerCall_RecordingState", "consumes": [ "application/json" ], @@ -649,16 +588,16 @@ ], "parameters": [ { - "name": "callId", + "name": "serverCallId", "in": "path", - "description": "Call id.", + "description": "The server call id.", "required": true, "type": "string" }, { - "name": "participantId", + "name": "recordingId", "in": "path", - "description": "Participant id.", + "description": "The recording id.", "required": true, "type": "string" }, @@ -667,18 +606,21 @@ } ], "responses": { - "202": { - "description": "Returns the remove participant response." + "200": { + "description": "Returns the recording state.", + "schema": { + "$ref": "#/definitions/GetCallRecordingStateResponse" + } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad request", "schema": { "$ref": "#/definitions/CommunicationError" }, "x-ms-error-response": true }, - "400": { - "description": "Bad request", + "404": { + "description": "Not found.", "schema": { "$ref": "#/definitions/CommunicationError" }, @@ -692,15 +634,13 @@ "x-ms-error-response": true } } - } - }, - "/calling/conversations/{conversationId}/recordings": { - "post": { + }, + "delete": { "tags": [ "Recording" ], - "summary": "Start call recording request", - "operationId": "Conversation_StartRecording", + "summary": "Stop recording a call.", + "operationId": "ServerCall_StopRecording", "consumes": [ "application/json" ], @@ -709,20 +649,18 @@ ], "parameters": [ { - "name": "conversationId", + "name": "serverCallId", "in": "path", - "description": "Encoded conversation url.", + "description": "The server call id.", "required": true, "type": "string" }, { - "name": "request", - "in": "body", - "description": "Request body of start call recording request.", + "name": "recordingId", + "in": "path", + "description": "The recording id.", "required": true, - "schema": { - "$ref": "#/definitions/StartCallRecordingRequest" - } + "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -730,10 +668,7 @@ ], "responses": { "200": { - "description": "Returns the start call recording response.", - "schema": { - "$ref": "#/definitions/StartCallRecordingResponse" - } + "description": "Returns the stop call recording response." }, "400": { "description": "Bad request", @@ -742,13 +677,6 @@ }, "x-ms-error-response": true }, - "404": { - "description": "Not found.", - "schema": { - "$ref": "#/definitions/CommunicationError" - }, - "x-ms-error-response": true - }, "500": { "description": "Internal server error.", "schema": { @@ -759,13 +687,13 @@ } } }, - "/calling/conversations/{conversationId}/recordings/{recordingId}": { - "get": { + "/calling/serverCalls/{serverCallId}/recordings/{recordingId}/:pause": { + "post": { "tags": [ "Recording" ], - "summary": "Get call recording state.", - "operationId": "Conversation_RecordingState", + "summary": "Pause recording a call.", + "operationId": "ServerCall_PauseRecording", "consumes": [ "application/json" ], @@ -774,16 +702,16 @@ ], "parameters": [ { - "name": "conversationId", + "name": "serverCallId", "in": "path", - "description": "Encoded conversation url.", + "description": "The server call id.", "required": true, "type": "string" }, { "name": "recordingId", "in": "path", - "description": "Recording id.", + "description": "The recording id.", "required": true, "type": "string" }, @@ -793,10 +721,7 @@ ], "responses": { "200": { - "description": "Returns the recording state.", - "schema": { - "$ref": "#/definitions/GetCallRecordingStateResponse" - } + "description": "Returns the pause call recording response." }, "400": { "description": "Bad request", @@ -805,13 +730,6 @@ }, "x-ms-error-response": true }, - "404": { - "description": "Not found.", - "schema": { - "$ref": "#/definitions/CommunicationError" - }, - "x-ms-error-response": true - }, "500": { "description": "Internal server error.", "schema": { @@ -820,13 +738,15 @@ "x-ms-error-response": true } } - }, - "delete": { + } + }, + "/calling/serverCalls/{serverCallId}/recordings/{recordingId}/:resume": { + "post": { "tags": [ "Recording" ], - "summary": "Stop recording a call.", - "operationId": "Conversation_StopRecording", + "summary": "Resume recording a call.", + "operationId": "ServerCall_ResumeRecording", "consumes": [ "application/json" ], @@ -835,16 +755,16 @@ ], "parameters": [ { - "name": "conversationId", + "name": "serverCallId", "in": "path", - "description": "Encoded conversation url.", + "description": "The server call id.", "required": true, "type": "string" }, { "name": "recordingId", "in": "path", - "description": "Recording id.", + "description": "The recording id.", "required": true, "type": "string" }, @@ -854,7 +774,7 @@ ], "responses": { "200": { - "description": "Returns the stop call recording response." + "description": "Returns the resume call recording response." }, "400": { "description": "Bad request", @@ -873,13 +793,14 @@ } } }, - "/calling/conversations/{conversationId}/recordings/{recordingId}/Pause": { + "/calling/serverCalls/{serverCallId}/:join": { "post": { "tags": [ - "Recording" + "ServerCall" ], - "summary": "Pause recording a call.", - "operationId": "Conversation_PauseRecording", + "summary": "Join a call.", + "description": "Join a call.", + "operationId": "ServerCall_JoinCall", "consumes": [ "application/json" ], @@ -888,26 +809,38 @@ ], "parameters": [ { - "name": "conversationId", + "name": "serverCallId", "in": "path", - "description": "Encoded conversation url.", + "description": "The server call id.", "required": true, "type": "string" }, { - "name": "recordingId", - "in": "path", - "description": "Recording id.", + "name": "callRequest", + "in": "body", + "description": "The join call request.", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/JoinCallRequest" + } }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { - "200": { - "description": "Returns the pause call recording response." + "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", @@ -926,13 +859,14 @@ } } }, - "/calling/conversations/{conversationId}/recordings/{recordingId}/Resume": { + "/calling/serverCalls/{serverCallId}/:playAudio": { "post": { "tags": [ - "Recording" + "ServerCall" ], - "summary": "Resume recording a call.", - "operationId": "Conversation_ResumeRecording", + "summary": "Play audio in a call.", + "description": "Play audio in a call.", + "operationId": "ServerCall_PlayAudio", "consumes": [ "application/json" ], @@ -941,26 +875,38 @@ ], "parameters": [ { - "name": "conversationId", + "name": "serverCallId", "in": "path", - "description": "Encoded conversation url.", + "description": "The server call id.", "required": true, "type": "string" }, { - "name": "recordingId", - "in": "path", - "description": "Recording id.", + "name": "request", + "in": "body", + "description": "Play audio request.", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/PlayAudioRequest" + } }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { - "200": { - "description": "Returns the resume call recording response." + "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", @@ -1008,13 +954,11 @@ "required": [ "targets", "source", - "callbackUri", - "requestedModalities", - "requestedCallEvents" + "callbackUri" ], "type": "object", "properties": { - "sourceAlternateIdentity": { + "alternateCallerId": { "$ref": "#/definitions/PhoneNumberIdentifier", "description": "The alternate identity of the source of the call if dialing out to a pstn number" }, @@ -1037,7 +981,7 @@ "description": "The callback URI.", "type": "string" }, - "requestedModalities": { + "requestedMediaTypes": { "description": "The requested modalities.", "type": "array", "items": { @@ -1072,8 +1016,8 @@ "description": "The response payload of the create call operation.", "type": "object", "properties": { - "callLegId": { - "description": "Call leg id of the call.", + "callConnectionId": { + "description": "The call connection id.", "type": "string" } } @@ -1163,7 +1107,7 @@ } }, "CancelAllMediaOperationsRequest": { - "description": "The request payload for cancel media processing", + "description": "The request payload for cancel all media operations", "type": "object", "properties": { "operationContext": { @@ -1173,7 +1117,7 @@ } }, "CancelAllMediaOperationsResponse": { - "description": "The response payload of the cancel media processing operation.", + "description": "The response payload of the cancel all media operations.", "type": "object", "properties": { "id": { @@ -1193,54 +1137,6 @@ } } }, - "JoinCallRequest": { - "description": "The request payload for join call.", - "required": [ - "source", - "callbackUri", - "requestedModalities", - "requestedCallEvents" - ], - "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" - }, - "requestedModalities": { - "description": "The requested modalities.", - "type": "array", - "items": { - "$ref": "#/definitions/CallModality" - } - }, - "requestedCallEvents": { - "description": "The requested call events to subscribe to.", - "type": "array", - "items": { - "$ref": "#/definitions/EventSubscriptionType" - } - } - } - }, - "JoinCallResponse": { - "description": "The response payload of the join call operation.", - "type": "object", - "properties": { - "callLegId": { - "description": "Call leg id of the call.", - "type": "string" - } - } - }, "InviteParticipantsRequest": { "description": "The invite participants request.", "required": [ @@ -1310,8 +1206,54 @@ } } }, - "CallState": { - "description": "The call state.", + "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/CallModality" + } + }, + "requestedCallEvents": { + "description": "The requested call events to subscribe to.", + "type": "array", + "items": { + "$ref": "#/definitions/EventSubscriptionType" + } + } + } + }, + "JoinCallResponse": { + "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": [ "unknown", "idle", @@ -1327,24 +1269,24 @@ ], "type": "string", "x-ms-enum": { - "name": "CallState", + "name": "CallConnectionState", "modelAsString": true } }, - "CallLegStateChangedEvent": { - "description": "The call state change event.", + "CallConnectionStateChangedEvent": { + "description": "The call connection state changed event.", "type": "object", "properties": { - "conversationId": { - "description": "The conversation.id.", + "serverCallId": { + "description": "The server call.id.", "type": "string" }, - "callLegId": { - "description": "The call leg.id.", + "callConnectionId": { + "description": "The call connection id.", "type": "string" }, - "callState": { - "$ref": "#/definitions/CallState" + "callConnectionState": { + "$ref": "#/definitions/CallConnectionState" } } }, @@ -1364,8 +1306,8 @@ "description": "The time of the recording started", "type": "string" }, - "conversationId": { - "description": "The conversation id from a out call start recording request", + "serverCallId": { + "description": "The server call.id.", "type": "string" } } @@ -1387,15 +1329,15 @@ } }, "ParticipantsUpdatedEvent": { - "description": "Class to represent roster update", + "description": "The participant update event", "type": "object", "properties": { - "callLegId": { - "description": "The call leg.id.", + "callConnectionId": { + "description": "The call connection id.", "type": "string" }, "participants": { - "description": "The list of participants", + "description": "The list of participants.", "type": "array", "items": { "$ref": "#/definitions/CommunicationParticipant" @@ -1404,15 +1346,15 @@ } }, "CommunicationParticipant": { - "description": "Class to represent entry in roster", + "description": "A participant in a call.", "type": "object", "properties": { "identifier": { "$ref": "#/definitions/CommunicationIdentifier", - "description": "ACS communication identifier" + "description": "Communication identifier of the participant" }, "participantId": { - "description": "Participant Id", + "description": "Participant id", "type": "string" }, "isMuted": { @@ -1446,8 +1388,8 @@ "$ref": "#/definitions/ToneInfo", "description": "The tone info." }, - "callLegId": { - "description": "The call leg.id.", + "callConnectionId": { + "description": "The call connection id.", "type": "string" } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/examples/Call_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/Call_CreateCall.json similarity index 100% rename from specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/examples/Call_CreateCall.json rename to specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/Call_CreateCall.json From 06acc37044c17043e574029f2adf76d9ffed0685 Mon Sep 17 00:00:00 2001 From: Naveed Ali Date: Tue, 8 Jun 2021 15:49:40 -0700 Subject: [PATCH 09/17] Added unhold to list of custom-word --- custom-words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/custom-words.txt b/custom-words.txt index 004ca5db6907..3a7cf591632e 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1968,6 +1968,7 @@ Undeleting unencrypted unexamined unhide +unhold Unigrams uniqueidentifier uniquestring From e5aeee3dd247245c9a278615012d5a3c66b7904f Mon Sep 17 00:00:00 2001 From: zihzhan Date: Tue, 8 Jun 2021 22:06:11 -0700 Subject: [PATCH 10/17] Update readme file accourding to new swagger. --- .../data-plane/CallingServer/readme.md | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/readme.md b/specification/communication/data-plane/CallingServer/readme.md index 3d4f232aa8c8..59b9562ec823 100644 --- a/specification/communication/data-plane/CallingServer/readme.md +++ b/specification/communication/data-plane/CallingServer/readme.md @@ -26,27 +26,16 @@ These are the global settings for the communicationservices. ```yaml openapi-type: data-plane -tag: package-2021-04-15-preview1 +tag: package-2021-06-15-preview ``` -### Tag: package-2021-04-15-preview1 +### Tag: package-2021-06-15-preview -These settings apply only when `--tag=package-2021-04-15-preview1` is specified on the command line. +These settings apply only when `--tag=package-2021-06-15-preview` is specified on the command line. -```yaml $(tag) == 'package-2021-04-15-preview1' +```yaml $(tag) == 'package-2021-06-15-preview' input-file: - - preview/2021-04-15-preview1/communicationservicescallingserver.json -title: - Azure Communication Services -``` - -### Tag: package-2021-05-28-preview2 - -These settings apply only when `--tag=package-2021-05-28-preview2` is specified on the command line. - -```yaml $(tag) == 'package-2021-04-15-preview1' -input-file: - - preview/2021-05-28-preview2/communicationservicescallingserver.json + - preview/2021-06-15-preview/communicationservicescallingserver.json title: Azure Communication Services ``` From 0cad607d91c6fdc1bb87ed8c293316fa94a1f093 Mon Sep 17 00:00:00 2001 From: Naveed Ali Date: Thu, 10 Jun 2021 00:18:52 -0700 Subject: [PATCH 11/17] update responses model suffix to result --- .../communicationservicescallingserver.json | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json index a18debac4212..460eca1fa5e1 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json @@ -2,8 +2,8 @@ "swagger": "2.0", "info": { "version": "2021-06-15-preview", - "title": "Azure Communication Calling Server Service", - "description": "Azure Communication Calling Server Service" + "title": "Azure Communication CallingServer Service", + "description": "Azure Communication CallingServer Service" }, "schemes": [ "https" @@ -47,7 +47,7 @@ "201": { "description": "Returns the create call response.", "schema": { - "$ref": "#/definitions/CreateCallResponse" + "$ref": "#/definitions/CreateCallResult" } }, "401": { @@ -167,7 +167,7 @@ "202": { "description": "Returns the play audio response.", "schema": { - "$ref": "#/definitions/PlayAudioResponse" + "$ref": "#/definitions/PlayAudioResult" } }, "401": { @@ -233,7 +233,7 @@ "200": { "description": "Returns the cancel all media operations response.", "schema": { - "$ref": "#/definitions/CancelAllMediaOperationsResponse" + "$ref": "#/definitions/CancelAllMediaOperationsResult" } }, "401": { @@ -546,7 +546,7 @@ "200": { "description": "Returns the start call recording response.", "schema": { - "$ref": "#/definitions/StartCallRecordingResponse" + "$ref": "#/definitions/StartCallRecordingResult" } }, "400": { @@ -609,7 +609,7 @@ "200": { "description": "Returns the recording state.", "schema": { - "$ref": "#/definitions/GetCallRecordingStateResponse" + "$ref": "#/definitions/CallRecordingStateResult" } }, "400": { @@ -832,7 +832,7 @@ "202": { "description": "Returns the join call response.", "schema": { - "$ref": "#/definitions/JoinCallResponse" + "$ref": "#/definitions/JoinCallResult" } }, "401": { @@ -898,7 +898,7 @@ "202": { "description": "Returns the play audio response.", "schema": { - "$ref": "#/definitions/PlayAudioResponse" + "$ref": "#/definitions/PlayAudioResult" } }, "401": { @@ -1012,7 +1012,7 @@ "MicrosoftTeamsUserIdentifier": { "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/MicrosoftTeamsUserIdentifierModel" }, - "CreateCallResponse": { + "CreateCallResult": { "description": "The response payload of the create call operation.", "type": "object", "properties": { @@ -1065,7 +1065,7 @@ "modelAsString": true } }, - "PlayAudioResponse": { + "PlayAudioResult": { "description": "The response payload for play audio operation.", "type": "object", "properties": { @@ -1116,7 +1116,7 @@ } } }, - "CancelAllMediaOperationsResponse": { + "CancelAllMediaOperationsResult": { "description": "The response payload of the cancel all media operations.", "type": "object", "properties": { @@ -1175,7 +1175,7 @@ } } }, - "StartCallRecordingResponse": { + "StartCallRecordingResult": { "description": "The response payload of start call recording operation.", "type": "object", "properties": { @@ -1197,7 +1197,7 @@ "modelAsString": true } }, - "GetCallRecordingStateResponse": { + "CallRecordingStateResult": { "description": "The response payload of get call recording state operation.", "type": "object", "properties": { @@ -1242,7 +1242,7 @@ } } }, - "JoinCallResponse": { + "JoinCallResult": { "description": "The response payload of the join call operation.", "type": "object", "properties": { From 11b398ff7802f67406f36ec3979202d425266f98 Mon Sep 17 00:00:00 2001 From: Naveed Ali Date: Mon, 14 Jun 2021 14:05:53 -0700 Subject: [PATCH 12/17] Removed error responses and consumes/produces values from all the apis. Changed invite participant to add participant. Other model name related changes. --- .../communicationservicescallingserver.json | 516 ++---------------- 1 file changed, 60 insertions(+), 456 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json index 460eca1fa5e1..827d4501e6f7 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json @@ -22,13 +22,7 @@ ], "summary": "Create a new call.", "description": "Create a new call.", - "operationId": "CallConnection_CreateCall", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "CallConnections_CreateCall", "parameters": [ { "name": "callRequest", @@ -49,27 +43,6 @@ "schema": { "$ref": "#/definitions/CreateCallResult" } - }, - "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 } } } @@ -81,13 +54,7 @@ ], "summary": "Hangup a call.", "description": "Hangup a call.", - "operationId": "CallConnection_HangupCall", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "CallConnections_HangupCall", "parameters": [ { "name": "callConnectionId", @@ -103,27 +70,6 @@ "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 } } } @@ -135,13 +81,7 @@ ], "summary": "Play audio in a call.", "description": "Play audio in a call.", - "operationId": "CallConnection_PlayAudio", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "CallConnections_PlayAudio", "parameters": [ { "name": "callConnectionId", @@ -169,27 +109,6 @@ "schema": { "$ref": "#/definitions/PlayAudioResult" } - }, - "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 } } } @@ -201,13 +120,7 @@ ], "summary": "Cancel all media operations.", "description": "Cancel all media operations.", - "operationId": "CallConnection_CancelAllMediaOperations", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "CallConnections_CancelAllMediaOperations", "parameters": [ { "name": "callConnectionId", @@ -235,27 +148,6 @@ "schema": { "$ref": "#/definitions/CancelAllMediaOperationsResult" } - }, - "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 } } } @@ -265,15 +157,9 @@ "tags": [ "ServerCall" ], - "summary": "Invite participants to the call.", - "description": "Invite participants to the call.", - "operationId": "ServerCall_InviteParticipants", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "summary": "Add a participant to the call.", + "description": "Add a participant to the call.", + "operationId": "ServerCalls_AddParticipant", "parameters": [ { "name": "serverCallId", @@ -283,12 +169,12 @@ "type": "string" }, { - "name": "inviteParticipantsRequest", + "name": "addParticipantRequest", "in": "body", - "description": "The invite participant request.", + "description": "The add participant request.", "required": true, "schema": { - "$ref": "#/definitions/InviteParticipantsRequest" + "$ref": "#/definitions/AddParticipantRequest" } }, { @@ -297,28 +183,7 @@ ], "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 + "description": "Returns the add participant response." } } } @@ -330,13 +195,7 @@ ], "summary": "Remove participant from the call.", "description": "Remove participant from the call.", - "operationId": "ServerCall_RemoveParticipant", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "ServerCalls_RemoveParticipant", "parameters": [ { "name": "serverCallId", @@ -359,27 +218,6 @@ "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 } } } @@ -389,15 +227,9 @@ "tags": [ "CallConnection" ], - "summary": "Invite participants to the call.", - "description": "Invite participants to the call.", - "operationId": "CallConnection_InviteParticipants", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "summary": "Add a participant to the call.", + "description": "Add a participant to the call.", + "operationId": "CallConnections_AddParticipant", "parameters": [ { "name": "callConnectionId", @@ -407,12 +239,12 @@ "type": "string" }, { - "name": "inviteParticipantsRequest", + "name": "addParticipantRequest", "in": "body", - "description": "Invite participant request.", + "description": "Add participant request.", "required": true, "schema": { - "$ref": "#/definitions/InviteParticipantsRequest" + "$ref": "#/definitions/AddParticipantRequest" } }, { @@ -421,28 +253,7 @@ ], "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 + "description": "Returns the add participant response." } } } @@ -454,13 +265,7 @@ ], "summary": "Remove participant from the call.", "description": "Remove participant from the call.", - "operationId": "CallConnection_RemoveParticipant", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "CallConnections_RemoveParticipant", "parameters": [ { "name": "callConnectionId", @@ -483,27 +288,6 @@ "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 } } } @@ -514,13 +298,7 @@ "Recording" ], "summary": "Start call recording request.", - "operationId": "ServerCall_StartRecording", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "ServerCalls_StartRecording", "parameters": [ { "name": "serverCallId", @@ -548,27 +326,6 @@ "schema": { "$ref": "#/definitions/StartCallRecordingResult" } - }, - "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 } } } @@ -578,14 +335,8 @@ "tags": [ "Recording" ], - "summary": "Get call recording state.", - "operationId": "ServerCall_RecordingState", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "summary": "Get call recording properties.", + "operationId": "ServerCalls_GetRecordingProperties", "parameters": [ { "name": "serverCallId", @@ -609,29 +360,8 @@ "200": { "description": "Returns the recording state.", "schema": { - "$ref": "#/definitions/CallRecordingStateResult" + "$ref": "#/definitions/CallRecordingProperties" } - }, - "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 } } }, @@ -640,13 +370,7 @@ "Recording" ], "summary": "Stop recording a call.", - "operationId": "ServerCall_StopRecording", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "ServerCalls_StopRecording", "parameters": [ { "name": "serverCallId", @@ -669,20 +393,6 @@ "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 } } } @@ -693,13 +403,7 @@ "Recording" ], "summary": "Pause recording a call.", - "operationId": "ServerCall_PauseRecording", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "ServerCalls_PauseRecording", "parameters": [ { "name": "serverCallId", @@ -722,20 +426,6 @@ "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 } } } @@ -746,13 +436,7 @@ "Recording" ], "summary": "Resume recording a call.", - "operationId": "ServerCall_ResumeRecording", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "ServerCalls_ResumeRecording", "parameters": [ { "name": "serverCallId", @@ -775,20 +459,6 @@ "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 } } } @@ -800,13 +470,7 @@ ], "summary": "Join a call.", "description": "Join a call.", - "operationId": "ServerCall_JoinCall", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "ServerCalls_JoinCall", "parameters": [ { "name": "serverCallId", @@ -834,27 +498,6 @@ "schema": { "$ref": "#/definitions/JoinCallResult" } - }, - "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 } } } @@ -866,13 +509,7 @@ ], "summary": "Play audio in a call.", "description": "Play audio in a call.", - "operationId": "ServerCall_PlayAudio", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "ServerCalls_PlayAudio", "parameters": [ { "name": "serverCallId", @@ -900,41 +537,20 @@ "schema": { "$ref": "#/definitions/PlayAudioResult" } - }, - "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 } } } } }, "definitions": { - "CallModality": { + "MediaType": { "enum": [ "audio", "video" ], "type": "string", "x-ms-enum": { - "name": "CallModality", + "name": "MediaType", "modelAsString": true } }, @@ -985,7 +601,7 @@ "description": "The requested modalities.", "type": "array", "items": { - "$ref": "#/definitions/CallModality" + "$ref": "#/definitions/MediaType" } }, "requestedCallEvents": { @@ -1022,9 +638,6 @@ } } }, - "CommunicationError": { - "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationError" - }, "PlayAudioRequest": { "description": "The request payload for playing audio.", "type": "object", @@ -1052,7 +665,7 @@ } }, "OperationStatus": { - "description": "Gets or sets the status of the operation", + "description": "The status of the operation", "enum": [ "notStarted", "running", @@ -1069,20 +682,20 @@ "description": "The response payload for play audio operation.", "type": "object", "properties": { - "id": { - "description": "Gets or sets the identifier.", + "operationId": { + "description": "The operation id.", "type": "string" }, "status": { "$ref": "#/definitions/OperationStatus" }, "operationContext": { - "description": "Gets or sets the operation context", + "description": "The operation context provided by client.", "type": "string" }, "resultInfo": { "$ref": "#/definitions/ResultInfo", - "description": "Gets or sets the result info" + "description": "The result info for the operation." } } }, @@ -1120,40 +733,34 @@ "description": "The response payload of the cancel all media operations.", "type": "object", "properties": { - "id": { - "description": "Gets or sets the identifier.", + "operationId": { + "description": "The operation id.", "type": "string" }, "status": { "$ref": "#/definitions/OperationStatus" }, "operationContext": { - "description": "Gets or sets the operation context", + "description": "The operation context provided by client.", "type": "string" }, "resultInfo": { "$ref": "#/definitions/ResultInfo", - "description": "Gets or sets the result info" + "description": "The result info for the operation." } } }, - "InviteParticipantsRequest": { - "description": "The invite participants request.", - "required": [ - "participants" - ], + "AddParticipantRequest": { + "description": "The add participant request.", "type": "object", "properties": { "alternateCallerId": { "$ref": "#/definitions/PhoneNumberIdentifier", "description": "The alternate identity of source participant." }, - "participants": { - "description": "The list of participants to be added to the call.", - "type": "array", - "items": { - "$ref": "#/definitions/CommunicationIdentifier" - } + "participant": { + "$ref": "#/definitions/CommunicationIdentifier", + "description": "The participant to be added to the call." }, "operationContext": { "description": "The operation context.", @@ -1186,7 +793,7 @@ } }, "CallRecordingState": { - "description": "The recording state of the recording", + "description": "The state of the recording", "enum": [ "active", "inactive" @@ -1197,8 +804,8 @@ "modelAsString": true } }, - "CallRecordingStateResult": { - "description": "The response payload of get call recording state operation.", + "CallRecordingProperties": { + "description": "The response payload of get call recording properties operation.", "type": "object", "properties": { "recordingState": { @@ -1230,7 +837,7 @@ "description": "The requested modalities.", "type": "array", "items": { - "$ref": "#/definitions/CallModality" + "$ref": "#/definitions/MediaType" } }, "requestedCallEvents": { @@ -1255,17 +862,11 @@ "CallConnectionState": { "description": "The call connection state.", "enum": [ - "unknown", - "idle", "incoming", - "establishing", - "established", - "hold", - "unhold", - "transferring", - "redirecting", - "terminating", - "terminated" + "connecting", + "connected", + "disconnecting", + "disconnected" ], "type": "string", "x-ms-enum": { @@ -1312,7 +913,7 @@ } } }, - "InviteParticipantsResultEvent": { + "AddParticipantResultEvent": { "type": "object", "properties": { "resultInfo": { @@ -1340,12 +941,12 @@ "description": "The list of participants.", "type": "array", "items": { - "$ref": "#/definitions/CommunicationParticipant" + "$ref": "#/definitions/CallParticipant" } } } }, - "CommunicationParticipant": { + "CallParticipant": { "description": "A participant in a call.", "type": "object", "properties": { @@ -1434,6 +1035,9 @@ "$ref": "#/definitions/ToneValue" } } + }, + "CommunicationError": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationError" } }, "parameters": { From 8ffb948e055000f2f18a05953f823c15673b623d Mon Sep 17 00:00:00 2001 From: Naveed Ali Date: Mon, 14 Jun 2021 14:54:03 -0700 Subject: [PATCH 13/17] Added examples for all the apis. --- .../communicationservicescallingserver.json | 75 +++++++++++++++++++ .../CallConnections_AddParticipant.json | 49 ++++++++++++ ...lConnections_CancelAllMediaOperations.json | 48 ++++++++++++ .../examples/CallConnections_CreateCall.json | 69 +++++++++++++++++ .../examples/CallConnections_HangupCall.json | 40 ++++++++++ .../examples/CallConnections_PlayAudio.json | 51 +++++++++++++ .../CallConnections_RemoveParticipant.json | 41 ++++++++++ .../examples/Call_CreateCall.json | 0 .../examples/ServerCalls_AddParticipant.json | 49 ++++++++++++ .../ServerCalls_GetRecordingProperties.json | 45 +++++++++++ .../examples/ServerCalls_JoinCall.json | 53 +++++++++++++ .../examples/ServerCalls_PauseRecording.json | 41 ++++++++++ .../examples/ServerCalls_PlayAudio.json | 52 +++++++++++++ .../ServerCalls_RemoveParticipant.json | 41 ++++++++++ .../examples/ServerCalls_ResumeRecording.json | 41 ++++++++++ .../examples/ServerCalls_StartRecording.json | 47 ++++++++++++ .../examples/ServerCalls_StopRecording.json | 41 ++++++++++ 17 files changed, 783 insertions(+) create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json delete mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/Call_CreateCall.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json index 827d4501e6f7..34ed26bf6195 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json @@ -44,6 +44,11 @@ "$ref": "#/definitions/CreateCallResult" } } + }, + "x-ms-examples": { + "Create a new outbound call": { + "$ref": "./examples/CallConnections_CreateCall.json" + } } } }, @@ -71,6 +76,11 @@ "202": { "description": "Returns the hangup call response." } + }, + "x-ms-examples": { + "Hangup a call": { + "$ref": "./examples/CallConnections_HangupCall.json" + } } } }, @@ -110,6 +120,11 @@ "$ref": "#/definitions/PlayAudioResult" } } + }, + "x-ms-examples": { + "Play audio in a call": { + "$ref": "./examples/CallConnections_PlayAudio.json" + } } } }, @@ -149,6 +164,11 @@ "$ref": "#/definitions/CancelAllMediaOperationsResult" } } + }, + "x-ms-examples": { + "Cancel all media operations": { + "$ref": "./examples/CallConnections_CancelAllMediaOperations.json" + } } } }, @@ -185,6 +205,11 @@ "202": { "description": "Returns the add participant response." } + }, + "x-ms-examples": { + "Add participant to the call": { + "$ref": "./examples/ServerCalls_AddParticipant.json" + } } } }, @@ -219,6 +244,11 @@ "202": { "description": "Returns the remove participant response." } + }, + "x-ms-examples": { + "Remove participant from the call": { + "$ref": "./examples/ServerCalls_RemoveParticipant.json" + } } } }, @@ -255,6 +285,11 @@ "202": { "description": "Returns the add participant response." } + }, + "x-ms-examples": { + "Add participant to the call": { + "$ref": "./examples/CallConnections_AddParticipant.json" + } } } }, @@ -289,6 +324,11 @@ "202": { "description": "Returns the remove participant response." } + }, + "x-ms-examples": { + "Remove participant from the call": { + "$ref": "./examples/CallConnections_RemoveParticipant.json" + } } } }, @@ -327,6 +367,11 @@ "$ref": "#/definitions/StartCallRecordingResult" } } + }, + "x-ms-examples": { + "Start call recording": { + "$ref": "./examples/ServerCalls_StartRecording.json" + } } } }, @@ -363,6 +408,11 @@ "$ref": "#/definitions/CallRecordingProperties" } } + }, + "x-ms-examples": { + "Get recording properties": { + "$ref": "./examples/ServerCalls_GetRecordingProperties.json" + } } }, "delete": { @@ -394,6 +444,11 @@ "200": { "description": "Returns the stop call recording response." } + }, + "x-ms-examples": { + "Stop the recording": { + "$ref": "./examples/ServerCalls_StopRecording.json" + } } } }, @@ -427,6 +482,11 @@ "200": { "description": "Returns the pause call recording response." } + }, + "x-ms-examples": { + "Pause the recording": { + "$ref": "./examples/ServerCalls_PauseRecording.json" + } } } }, @@ -460,6 +520,11 @@ "200": { "description": "Returns the resume call recording response." } + }, + "x-ms-examples": { + "Resume the recording": { + "$ref": "./examples/ServerCalls_ResumeRecording.json" + } } } }, @@ -499,6 +564,11 @@ "$ref": "#/definitions/JoinCallResult" } } + }, + "x-ms-examples": { + "Join a call": { + "$ref": "./examples/ServerCalls_JoinCall.json" + } } } }, @@ -538,6 +608,11 @@ "$ref": "#/definitions/PlayAudioResult" } } + }, + "x-ms-examples": { + "Play audio in a call": { + "$ref": "./examples/ServerCalls_PlayAudio.json" + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json new file mode 100644 index 000000000000..34d3bf3aceaa --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json @@ -0,0 +1,49 @@ +{ + "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_ae9e3307-f56e-44be-8934-80a63f080538" + } + }, + "operationContext": "5161f20a-7225-4a74-a529-efaf8e7b351d", + "callbackUri": "https://app.contoso.com/callback" + } + }, + "responses": { + "202": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} \ No newline at end of file diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json new file mode 100644 index 000000000000..03fcc894e279 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json @@ -0,0 +1,48 @@ +{ + "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": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} \ No newline at end of file diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json new file mode 100644 index 000000000000..35b99e0c2084 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "callRequest": { + "source": { + "communicationUser": { + "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_81625941-c12d-4f06-a10e-a1ffe67181b9" + } + }, + "targets": [ + { + "communicationUser": { + "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_0fba15c1-4cc2-4055-b09a-b1c29f6fb44f" + } + }, + { + "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": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json new file mode 100644 index 000000000000..10c8ab293e38 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c" + }, + "responses": { + "202": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} \ No newline at end of file diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json new file mode 100644 index 000000000000..abdabb80c538 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json @@ -0,0 +1,51 @@ +{ + "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": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json new file mode 100644 index 000000000000..028a9b21528a --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json @@ -0,0 +1,41 @@ +{ + "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": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} \ No newline at end of file diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/Call_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/Call_CreateCall.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json new file mode 100644 index 000000000000..17c467884c6c --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json @@ -0,0 +1,49 @@ +{ + "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": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} \ No newline at end of file diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json new file mode 100644 index 000000000000..b35e4d2474e1 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" + }, + "responses": { + "200": { + "body": { + "recordingState": "active" + } + }, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json new file mode 100644 index 000000000000..4d1236cedb61 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json @@ -0,0 +1,53 @@ +{ + "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": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json new file mode 100644 index 000000000000..9132e4776d90 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" + }, + "responses": { + "200": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json new file mode 100644 index 000000000000..03ca939707ff --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json @@ -0,0 +1,52 @@ +{ + "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": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} \ No newline at end of file diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json new file mode 100644 index 000000000000..74e730535ac1 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json @@ -0,0 +1,41 @@ +{ + "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": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} \ No newline at end of file diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json new file mode 100644 index 000000000000..9132e4776d90 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" + }, + "responses": { + "200": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json new file mode 100644 index 000000000000..6d9c52d04621 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json @@ -0,0 +1,47 @@ +{ + "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": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json new file mode 100644 index 000000000000..9132e4776d90 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" + }, + "responses": { + "200": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } + } +} From b9f6b6af5dcf08d665541636e41e7546a0237acd Mon Sep 17 00:00:00 2001 From: Naveed Ali Date: Mon, 14 Jun 2021 15:27:27 -0700 Subject: [PATCH 14/17] Removed error responses from example --- .../CallConnections_AddParticipant.json | 34 ++----------------- ...lConnections_CancelAllMediaOperations.json | 32 +---------------- .../examples/CallConnections_CreateCall.json | 24 ------------- .../examples/CallConnections_HangupCall.json | 34 ++----------------- .../examples/CallConnections_PlayAudio.json | 30 ---------------- .../CallConnections_RemoveParticipant.json | 34 ++----------------- .../examples/ServerCalls_AddParticipant.json | 34 ++----------------- .../ServerCalls_GetRecordingProperties.json | 30 ---------------- .../examples/ServerCalls_JoinCall.json | 24 ------------- .../examples/ServerCalls_PauseRecording.json | 32 +---------------- .../examples/ServerCalls_PlayAudio.json | 32 +---------------- .../ServerCalls_RemoveParticipant.json | 34 ++----------------- .../examples/ServerCalls_ResumeRecording.json | 32 +---------------- .../examples/ServerCalls_StartRecording.json | 30 ---------------- .../examples/ServerCalls_StopRecording.json | 32 +---------------- 15 files changed, 15 insertions(+), 453 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json index 34d3bf3aceaa..622838bff954 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json @@ -14,36 +14,6 @@ } }, "responses": { - "202": {}, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } - } + "202": {} } -} \ No newline at end of file +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json index 03fcc894e279..c8241a9db4f9 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json @@ -13,36 +13,6 @@ "status": "completed", "operationContext": "91848e99-0d36-4bca-ac06-6c38fe390289" } - }, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } } } -} \ No newline at end of file +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json index 35b99e0c2084..4569ae3bd72f 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json @@ -40,30 +40,6 @@ "body": { "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c" } - }, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json index 10c8ab293e38..bb83f5d9fc63 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json @@ -5,36 +5,6 @@ "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c" }, "responses": { - "202": {}, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } - } + "202": {} } -} \ No newline at end of file +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json index abdabb80c538..cd4a4a1b2619 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json @@ -16,36 +16,6 @@ "status": "running", "operationContext": "31130c66-2f86-41b5-af61-23850243e093" } - }, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json index 028a9b21528a..423c4f4cc95e 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json @@ -6,36 +6,6 @@ "participantId": "d8b26c04-7186-41e2-971a-bdfa9a662a53" }, "responses": { - "202": {}, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } - } + "202": {} } -} \ No newline at end of file +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json index 17c467884c6c..0d18870b4419 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json @@ -14,36 +14,6 @@ } }, "responses": { - "202": {}, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } - } + "202": {} } -} \ No newline at end of file +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json index b35e4d2474e1..c50095b4252c 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json @@ -10,36 +10,6 @@ "body": { "recordingState": "active" } - }, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json index 4d1236cedb61..219730900176 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json @@ -24,30 +24,6 @@ "body": { "callConnectionId": "b9614373-fd0b-480c-8fd2-cb58b70eab9f" } - }, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json index 9132e4776d90..7c5da162382f 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json @@ -6,36 +6,6 @@ "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" }, "responses": { - "200": {}, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } - } + "200": {} } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json index 03ca939707ff..d1bef777633c 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json @@ -17,36 +17,6 @@ "status": "running", "operationContext": "31130c66-2f86-41b5-af61-23850243e093" } - }, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } } } -} \ No newline at end of file +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json index 74e730535ac1..ee6f41775880 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json @@ -6,36 +6,6 @@ "participantId": "d8b26c04-7186-41e2-971a-bdfa9a662a53" }, "responses": { - "202": {}, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } - } + "202": {} } -} \ No newline at end of file +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json index 9132e4776d90..7c5da162382f 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json @@ -6,36 +6,6 @@ "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" }, "responses": { - "200": {}, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } - } + "200": {} } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json index 6d9c52d04621..ecdf984eca6d 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json @@ -12,36 +12,6 @@ "body": { "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" } - }, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json index 9132e4776d90..7c5da162382f 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json @@ -6,36 +6,6 @@ "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" }, "responses": { - "200": {}, - "400": { - "body": { - "code": "400", - "message": "The request contains invalid data." - } - }, - "401": { - "body": { - "code": "401", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "code": "403", - "message": "User is not allowed to perform specified action." - } - }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, - "500": { - "body": { - "code": "500", - "message": "Internal server error." - } - } + "200": {} } } From 60ae3d6b8806c896f2e54e4bfd900357dbcfd54a Mon Sep 17 00:00:00 2001 From: Naveed Ali Date: Tue, 15 Jun 2021 01:44:45 -0700 Subject: [PATCH 15/17] Added back error response type, added response body for add participant operation --- .../communicationservicescallingserver.json | 333 ++++++++++++++++-- .../CallConnections_AddParticipant.json | 38 +- ...lConnections_CancelAllMediaOperations.json | 30 ++ .../examples/CallConnections_CreateCall.json | 28 +- .../examples/CallConnections_HangupCall.json | 32 +- .../examples/CallConnections_PlayAudio.json | 30 ++ .../CallConnections_RemoveParticipant.json | 32 +- .../examples/ServerCalls_AddParticipant.json | 36 +- .../ServerCalls_GetRecordingProperties.json | 30 ++ .../examples/ServerCalls_JoinCall.json | 30 ++ .../examples/ServerCalls_PauseRecording.json | 32 +- .../examples/ServerCalls_PlayAudio.json | 30 ++ .../ServerCalls_RemoveParticipant.json | 32 +- .../examples/ServerCalls_ResumeRecording.json | 32 +- .../examples/ServerCalls_StartRecording.json | 30 ++ .../examples/ServerCalls_StopRecording.json | 32 +- 16 files changed, 767 insertions(+), 40 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json index 34ed26bf6195..f53b1f864b01 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/communicationservicescallingserver.json @@ -43,10 +43,22 @@ "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 outbound call": { + "Create a new call.": { "$ref": "./examples/CallConnections_CreateCall.json" } } @@ -57,8 +69,8 @@ "tags": [ "CallConnection" ], - "summary": "Hangup a call.", - "description": "Hangup a call.", + "summary": "Hangup the call.", + "description": "Hangup the call.", "operationId": "CallConnections_HangupCall", "parameters": [ { @@ -75,10 +87,25 @@ "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 a call": { + "Hangup the call.": { "$ref": "./examples/CallConnections_HangupCall.json" } } @@ -89,8 +116,8 @@ "tags": [ "CallConnection" ], - "summary": "Play audio in a call.", - "description": "Play audio in a call.", + "summary": "Play audio in the call.", + "description": "Play audio in the call.", "operationId": "CallConnections_PlayAudio", "parameters": [ { @@ -119,10 +146,25 @@ "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 a call": { + "Play audio in the call.": { "$ref": "./examples/CallConnections_PlayAudio.json" } } @@ -163,10 +205,25 @@ "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": { + "Cancel all media operations.": { "$ref": "./examples/CallConnections_CancelAllMediaOperations.json" } } @@ -203,11 +260,29 @@ ], "responses": { "202": { - "description": "Returns the add participant response." + "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 participant to the call": { + "Add a participant to the call.": { "$ref": "./examples/ServerCalls_AddParticipant.json" } } @@ -243,10 +318,25 @@ "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": { + "Remove participant from the call.": { "$ref": "./examples/ServerCalls_RemoveParticipant.json" } } @@ -283,11 +373,29 @@ ], "responses": { "202": { - "description": "Returns the add participant response." + "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 participant to the call": { + "Add a participant to the call.": { "$ref": "./examples/CallConnections_AddParticipant.json" } } @@ -298,8 +406,8 @@ "tags": [ "CallConnection" ], - "summary": "Remove participant from the call.", - "description": "Remove participant from the call.", + "summary": "Remove a participant from the call.", + "description": "Remove a participant from the call.", "operationId": "CallConnections_RemoveParticipant", "parameters": [ { @@ -323,10 +431,25 @@ "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": { + "Remove a participant from the call.": { "$ref": "./examples/CallConnections_RemoveParticipant.json" } } @@ -337,7 +460,7 @@ "tags": [ "Recording" ], - "summary": "Start call recording request.", + "summary": "Start recording of the call.", "operationId": "ServerCalls_StartRecording", "parameters": [ { @@ -366,10 +489,25 @@ "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 call recording": { + "Start recording of the call.": { "$ref": "./examples/ServerCalls_StartRecording.json" } } @@ -407,10 +545,25 @@ "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 recording properties": { + "Get call recording properties.": { "$ref": "./examples/ServerCalls_GetRecordingProperties.json" } } @@ -419,7 +572,7 @@ "tags": [ "Recording" ], - "summary": "Stop recording a call.", + "summary": "Stop recording the call.", "operationId": "ServerCalls_StopRecording", "parameters": [ { @@ -443,10 +596,25 @@ "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 the recording": { + "Stop recording the call.": { "$ref": "./examples/ServerCalls_StopRecording.json" } } @@ -457,7 +625,7 @@ "tags": [ "Recording" ], - "summary": "Pause recording a call.", + "summary": "Pause recording the call.", "operationId": "ServerCalls_PauseRecording", "parameters": [ { @@ -481,10 +649,25 @@ "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 the recording": { + "Pause recording the call.": { "$ref": "./examples/ServerCalls_PauseRecording.json" } } @@ -495,7 +678,7 @@ "tags": [ "Recording" ], - "summary": "Resume recording a call.", + "summary": "Resume recording the call.", "operationId": "ServerCalls_ResumeRecording", "parameters": [ { @@ -519,10 +702,25 @@ "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 the recording": { + "Resume recording the call.": { "$ref": "./examples/ServerCalls_ResumeRecording.json" } } @@ -563,10 +761,22 @@ "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": { + "Join a call.": { "$ref": "./examples/ServerCalls_JoinCall.json" } } @@ -577,8 +787,8 @@ "tags": [ "ServerCall" ], - "summary": "Play audio in a call.", - "description": "Play audio in a call.", + "summary": "Play audio in the call.", + "description": "Play audio in the call.", "operationId": "ServerCalls_PlayAudio", "parameters": [ { @@ -607,10 +817,25 @@ "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 a call": { + "Play audio in the call.": { "$ref": "./examples/ServerCalls_PlayAudio.json" } } @@ -847,6 +1072,16 @@ } } }, + "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", @@ -1111,6 +1346,9 @@ } } }, + "CommunicationErrorResponse": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + }, "CommunicationError": { "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationError" } @@ -1134,6 +1372,43 @@ "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, diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json index 622838bff954..26639dfad23d 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json @@ -6,7 +6,7 @@ "addParticipantRequest": { "participant": { "communicationUser": { - "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_ae9e3307-f56e-44be-8934-80a63f080538" + "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_387c0153-3b4d-4779-9ee3-a6e2440df075" } }, "operationContext": "5161f20a-7225-4a74-a529-efaf8e7b351d", @@ -14,6 +14,40 @@ } }, "responses": { - "202": {} + "202": { + "body": { + "participantId": "c736e607-5b39-42a7-a6bb-bb43029e5bac" + } + }, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json index c8241a9db4f9..a915a59b169e 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json @@ -13,6 +13,36 @@ "status": "completed", "operationContext": "91848e99-0d36-4bca-ac06-6c38fe390289" } + }, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json index 4569ae3bd72f..c0fa264658b4 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json @@ -5,13 +5,13 @@ "callRequest": { "source": { "communicationUser": { - "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_81625941-c12d-4f06-a10e-a1ffe67181b9" + "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_da7be3a9-8788-42a6-85c6-56b2cf784fce" } }, "targets": [ { "communicationUser": { - "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_0fba15c1-4cc2-4055-b09a-b1c29f6fb44f" + "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_0f50d091-5bd3-448b-884d-44be7037d9b9" } }, { @@ -40,6 +40,30 @@ "body": { "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c" } + }, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json index bb83f5d9fc63..2257b3f4f760 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json @@ -5,6 +5,36 @@ "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c" }, "responses": { - "202": {} + "202": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json index cd4a4a1b2619..abdabb80c538 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json @@ -16,6 +16,36 @@ "status": "running", "operationContext": "31130c66-2f86-41b5-af61-23850243e093" } + }, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json index 423c4f4cc95e..40306f17d26e 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json @@ -6,6 +6,36 @@ "participantId": "d8b26c04-7186-41e2-971a-bdfa9a662a53" }, "responses": { - "202": {} + "202": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json index 0d18870b4419..ea76d6c65ff1 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json @@ -14,6 +14,40 @@ } }, "responses": { - "202": {} + "202": { + "body": { + "participantId": "c736e607-5b39-42a7-a6bb-bb43029e5bac" + } + }, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json index c50095b4252c..b35e4d2474e1 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json @@ -10,6 +10,36 @@ "body": { "recordingState": "active" } + }, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json index 219730900176..d0efa71713a6 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json @@ -24,6 +24,36 @@ "body": { "callConnectionId": "b9614373-fd0b-480c-8fd2-cb58b70eab9f" } + }, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json index 7c5da162382f..9132e4776d90 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json @@ -6,6 +6,36 @@ "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" }, "responses": { - "200": {} + "200": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json index d1bef777633c..2f3663163396 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json @@ -17,6 +17,36 @@ "status": "running", "operationContext": "31130c66-2f86-41b5-af61-23850243e093" } + }, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json index ee6f41775880..c3604971c626 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json @@ -6,6 +6,36 @@ "participantId": "d8b26c04-7186-41e2-971a-bdfa9a662a53" }, "responses": { - "202": {} + "202": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json index 7c5da162382f..9132e4776d90 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json @@ -6,6 +6,36 @@ "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" }, "responses": { - "200": {} + "200": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json index ecdf984eca6d..6d9c52d04621 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json @@ -12,6 +12,36 @@ "body": { "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" } + }, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json index 7c5da162382f..9132e4776d90 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json @@ -6,6 +6,36 @@ "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" }, "responses": { - "200": {} + "200": {}, + "400": { + "body": { + "code": "400", + "message": "The request contains invalid data." + } + }, + "401": { + "body": { + "code": "401", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + }, + "404": { + "body": { + "code": "404", + "message": "Resource not found on the server." + } + }, + "500": { + "body": { + "code": "500", + "message": "Internal server error." + } + } } } From 5fff6b9c5674894b7329794856ccd000191b140a Mon Sep 17 00:00:00 2001 From: Naveed Ali Date: Tue, 15 Jun 2021 01:57:07 -0700 Subject: [PATCH 16/17] Fix join call example --- .../2021-06-15-preview/examples/ServerCalls_JoinCall.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json index d0efa71713a6..4d1236cedb61 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json @@ -43,12 +43,6 @@ "message": "User is not allowed to perform specified action." } }, - "404": { - "body": { - "code": "404", - "message": "Resource not found on the server." - } - }, "500": { "body": { "code": "500", From 231d94c5578c139d53206b3cfc1be069a644983a Mon Sep 17 00:00:00 2001 From: Naveed Ali Date: Tue, 15 Jun 2021 02:09:45 -0700 Subject: [PATCH 17/17] Update the examples --- .../CallConnections_AddParticipant.json | 30 ++++++++++++------- ...lConnections_CancelAllMediaOperations.json | 30 ++++++++++++------- .../examples/CallConnections_CreateCall.json | 24 ++++++++++----- .../examples/CallConnections_HangupCall.json | 30 ++++++++++++------- .../examples/CallConnections_PlayAudio.json | 30 ++++++++++++------- .../CallConnections_RemoveParticipant.json | 30 ++++++++++++------- .../examples/ServerCalls_AddParticipant.json | 30 ++++++++++++------- .../ServerCalls_GetRecordingProperties.json | 30 ++++++++++++------- .../examples/ServerCalls_JoinCall.json | 24 ++++++++++----- .../examples/ServerCalls_PauseRecording.json | 30 ++++++++++++------- .../examples/ServerCalls_PlayAudio.json | 30 ++++++++++++------- .../ServerCalls_RemoveParticipant.json | 30 ++++++++++++------- .../examples/ServerCalls_ResumeRecording.json | 30 ++++++++++++------- .../examples/ServerCalls_StartRecording.json | 30 ++++++++++++------- .../examples/ServerCalls_StopRecording.json | 30 ++++++++++++------- 15 files changed, 292 insertions(+), 146 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json index 26639dfad23d..e2d52eddcafd 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_AddParticipant.json @@ -21,32 +21,42 @@ }, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json index a915a59b169e..03642fbb32b3 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CancelAllMediaOperations.json @@ -16,32 +16,42 @@ }, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json index c0fa264658b4..071b505be1ee 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_CreateCall.json @@ -43,26 +43,34 @@ }, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json index 2257b3f4f760..813b2fdf62fa 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_HangupCall.json @@ -8,32 +8,42 @@ "202": {}, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json index abdabb80c538..7eb69a0c1b39 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_PlayAudio.json @@ -19,32 +19,42 @@ }, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json index 40306f17d26e..52b34a7ee44a 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/CallConnections_RemoveParticipant.json @@ -9,32 +9,42 @@ "202": {}, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json index ea76d6c65ff1..df749269243e 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_AddParticipant.json @@ -21,32 +21,42 @@ }, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json index b35e4d2474e1..784c30d73294 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_GetRecordingProperties.json @@ -13,32 +13,42 @@ }, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json index 4d1236cedb61..c6394104b9d1 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_JoinCall.json @@ -27,26 +27,34 @@ }, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json index 9132e4776d90..0015a5349313 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PauseRecording.json @@ -9,32 +9,42 @@ "200": {}, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json index 2f3663163396..2f15ac48d2df 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_PlayAudio.json @@ -20,32 +20,42 @@ }, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json index c3604971c626..1ab21f281dfd 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_RemoveParticipant.json @@ -9,32 +9,42 @@ "202": {}, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json index 9132e4776d90..0015a5349313 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_ResumeRecording.json @@ -9,32 +9,42 @@ "200": {}, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json index 6d9c52d04621..ac39cd68f62c 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StartRecording.json @@ -15,32 +15,42 @@ }, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } } diff --git a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json index 9132e4776d90..0015a5349313 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-06-15-preview/examples/ServerCalls_StopRecording.json @@ -9,32 +9,42 @@ "200": {}, "400": { "body": { - "code": "400", - "message": "The request contains invalid data." + "error": { + "code": "400", + "message": "The request contains invalid data." + } } }, "401": { "body": { - "code": "401", - "message": "Request is not authorized." + "error": { + "code": "401", + "message": "Request is not authorized." + } } }, "403": { "body": { - "code": "403", - "message": "User is not allowed to perform specified action." + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } } }, "404": { "body": { - "code": "404", - "message": "Resource not found on the server." + "error": { + "code": "404", + "message": "Resource not found on the server." + } } }, "500": { "body": { - "code": "500", - "message": "Internal server error." + "error": { + "code": "500", + "message": "Internal server error." + } } } }