diff --git a/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/communicationservicesrooms.json b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/communicationservicesrooms.json new file mode 100644 index 000000000000..dcd3f4fcdc95 --- /dev/null +++ b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/communicationservicesrooms.json @@ -0,0 +1,550 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Communication Room Service", + "description": "Azure Communication Room Service", + "version": "2023-03-31-preview" + }, + "paths": { + "/rooms": { + "post": { + "tags": [ + "Rooms" + ], + "summary": "Creates a new room.", + "operationId": "Rooms_CreateRoom", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "Repeatability-Request-ID", + "description": "If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs.", + "type": "string", + "format": "uuid" + }, + { + "in": "header", + "name": "Repeatability-First-Sent", + "description": "If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date", + "type": "string", + "format": "date-time" + }, + { + "in": "body", + "name": "createRoomRequest", + "description": "The create room request body.", + "schema": { + "$ref": "#/definitions/CreateRoomRequest" + }, + "required": true + } + ], + "responses": { + "201": { + "description": "Request successful. The action returns a new room.", + "schema": { + "$ref": "#/definitions/RoomModel" + } + }, + "default": { + "description": "Error response", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "Create a new meeting room.": { + "$ref": "./examples/Rooms_CreateRoom.json" + } + } + } + }, + "/rooms/{roomId}": { + "get": { + "tags": [ + "Rooms" + ], + "summary": "Retrieves an existing room by id.", + "operationId": "Rooms_GetRoom", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "roomId", + "description": "The id of the room requested", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The action returns a room.", + "schema": { + "$ref": "#/definitions/RoomModel" + } + }, + "default": { + "description": "Error response", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "Get meeting room.": { + "$ref": "./examples/Rooms_GetRoom.json" + } + } + }, + "patch": { + "tags": [ + "Rooms" + ], + "summary": "Update a room with given changes.", + "operationId": "Rooms_UpdateRoom", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "roomId", + "description": "The id of the room requested", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "patchRoomRequest", + "description": "The patch room request", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "Request successful. The action returns an updated room.", + "schema": { + "$ref": "#/definitions/RoomModel" + } + }, + "default": { + "description": "Error response", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "Update meeting room's properties.": { + "$ref": "./examples/Rooms_UpdateRoom.json" + } + } + }, + "delete": { + "tags": [ + "Rooms" + ], + "summary": "Delete a room.", + "operationId": "Rooms_DeleteRoom", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "roomId", + "description": "The id of the room to be deleted", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "The room was successfully deleted." + }, + "default": { + "description": "Error response", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "Delete a meeting room.": { + "$ref": "./examples/Rooms_DeleteRoom.json" + } + } + } + }, + "/rooms/{roomId}/participants": { + "get": { + "tags": [ + "Participants" + ], + "summary": "Get participants in a room.", + "operationId": "Rooms_GetParticipants", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "roomId", + "description": "The id of the room to get participants from", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The action returns the participants of a room.", + "schema": { + "$ref": "#/definitions/ParticipantsCollection" + } + }, + "default": { + "description": "Error response", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "Get participants": { + "$ref": "./examples/Rooms_GetParticipants.json" + } + } + }, + "patch": { + "tags": [ + "Participants" + ], + "summary": "Upsert participants to a room", + "operationId": "Rooms_PatchParticipants", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "roomId", + "description": "Room id to patch participants.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "patchParticipantsRequest", + "description": "Participants to be patched to the room.", + "required": true, + "schema": { + "$ref": "#/definitions/PatchParticipantsRequest" + } + } + ], + "responses": { + "200": { + "description": "The participants were successfully added. The action returns an empty object.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "Error response", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "Add participants": { + "$ref": "./examples/Rooms_AddParticipants.json" + } + } + } + } + }, + "definitions": { + "CommunicationErrorResponse": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + }, + "CreateRoomRequest": { + "description": "Request payload for creating new room.", + "type": "object", + "properties": { + "title": { + "description": "The room title.", + "type": "string", + "example": "Meeting with Alice and Bob" + }, + "validFrom": { + "format": "date-time", + "description": "The timestamp from when the room is open for joining. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. The default value is the current date time.", + "type": "string", + "example": "2021-09-07T07:55:41Z" + }, + "validUntil": { + "format": "date-time", + "description": "The timestamp from when the room can no longer be joined. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. The default value is the current date time plus 180 days.", + "type": "string", + "example": "2020-09-08T15:55:41Z" + }, + "participants": { + "description": "(Optional) Collection of participants invited to the room.", + "type": "array", + "items": { + "$ref": "#/definitions/RoomParticipant" + }, + "x-ms-identifiers": [] + } + } + }, + "RoomParticipant": { + "description": "A participant of the room.", + "required": [ + "rawId", + "role" + ], + "type": "object", + "properties": { + "rawId": { + "description": "Raw id of the identifier. Optional in requests, required in responses.", + "type": "string" + }, + "role": { + "$ref": "#/definitions/Role" + } + } + }, + "Role": { + "description": "The Role of a room participant.", + "enum": [ + "Presenter", + "Attendee", + "Consumer" + ], + "type": "string", + "x-ms-enum": { + "name": "Role", + "modelAsString": true + } + }, + "RoomModel": { + "description": "The meeting room.", + "type": "object", + "required": [ + "id", + "createdDateTime", + "validFrom", + "validUntil" + ], + "properties": { + "id": { + "description": "Unique identifier of a room. This id is server generated.", + "type": "string", + "example": "999126454" + }, + "title": { + "description": "The room title.", + "type": "string", + "example": "Meeting with Alice and Bob" + }, + "createdDateTime": { + "format": "date-time", + "description": "The timestamp when the room was created at the server. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2021-09-06T05:55:41Z" + }, + "validFrom": { + "format": "date-time", + "description": "The timestamp from when the room is open for joining. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2021-09-07T07:55:41Z" + }, + "validUntil": { + "format": "date-time", + "description": "The timestamp from when the room can no longer be joined. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2021-09-08T15:55:41Z" + } + } + }, + "UpdateRoomRequest": { + "description": "Request payload for updating a room.", + "type": "object", + "properties": { + "title": { + "description": "The room title.", + "type": "string", + "example": "Meeting with Alice and Bob" + }, + "validFrom": { + "format": "date-time", + "description": "(Optional) The timestamp from when the room is open for joining. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2021-09-07T07:55:41Z" + }, + "validUntil": { + "format": "date-time", + "description": "(Optional) The timestamp from when the room can no longer be joined. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2020-09-08T15:55:41Z" + } + } + }, + "PatchParticipantsRequest": { + "description": "Participants to be patched in the room.", + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "role": { + "$ref": "#/definitions/Role" + } + } + }, + "example": { + "rawId1": { + "role": "Presenter" + }, + "rawId2": { + "role": "Attendee" + }, + "rawId3": null + } + }, + "ParticipantsCollection": { + "description": "A collection of participants in a room.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "A collection of participants", + "type": "array", + "items": { + "$ref": "#/definitions/RoomParticipant" + } + }, + "nextLink": { + "description": "If there are more participants that can be retrieved, the next link will be populated.", + "type": "string" + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "in": "query", + "name": "api-version", + "description": "Version of API to invoke.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "Endpoint": { + "in": "path", + "name": "endpoint", + "description": "The endpoint of the Azure Communication resource.", + "required": true, + "type": "string", + "format": "uri", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + } + }, + "securityDefinitions": { + "Authorization": { + "type": "apiKey", + "name": "Authorization", + "in": "header", + "description": "An ACS (Azure Communication Services) user access token." + } + }, + "security": [ + { + "Authorization": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + } +} diff --git a/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_AddParticipants.json b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_AddParticipants.json new file mode 100644 index 000000000000..379ae62d009e --- /dev/null +++ b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_AddParticipants.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "endpoint": "https://contoso.communication.azure.com/", + "api-version": "2023-03-31-preview", + "roomId": "99199690362660524", + "patchParticipantsRequest": { + "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000666": { + "role": "Presenter" + }, + "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000667": { + "role": "Attendee" + } + } + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_CreateRoom.json b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_CreateRoom.json new file mode 100644 index 000000000000..1c4a4dd33713 --- /dev/null +++ b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_CreateRoom.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "endpoint": "https://contoso.communication.azure.com/", + "api-version": "2023-03-31-preview", + "createRoomRequest": { + "title": "Meeting with Alice and Bob", + "validFrom": "2022-05-30T00:00:00Z", + "validUntil": "2022-06-30T00:00:00Z" + } + }, + "responses": { + "201": { + "body": { + "id": "99117812428622880", + "title": "Meeting with Alice and Bob", + "createdDateTime": "2022-05-26T05:46:17.8159131+00:00", + "validFrom": "2022-05-30T00:00:00+00:00", + "validUntil": "2022-06-30T00:00:00+00:00" + } + } + } +} diff --git a/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_DeleteRoom.json b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_DeleteRoom.json new file mode 100644 index 000000000000..67b901c4b067 --- /dev/null +++ b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_DeleteRoom.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "endpoint": "https://contoso.communication.azure.com/", + "api-version": "2023-01-01", + "roomId": "99199690362660524" + }, + "responses": { + "204": {} + } +} diff --git a/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_GetParticipants.json b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_GetParticipants.json new file mode 100644 index 000000000000..ef37e6f2734e --- /dev/null +++ b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_GetParticipants.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "endpoint": "https://contoso.communication.azure.com/", + "api-version": "2023-03-31-preview", + "roomId": "99199690362660524" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "rawId": "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000333", + "role": "Presenter" + }, + { + "rawId": "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000444", + "role": "Attendee" + }, + { + "rawId": "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000555", + "role": "Attendee" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_GetRoom.json b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_GetRoom.json new file mode 100644 index 000000000000..55e4273911d6 --- /dev/null +++ b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_GetRoom.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "endpoint": "https://contoso.communication.azure.com/", + "api-version": "2023-03-31-preview", + "roomId": "99117812428622880" + }, + "responses": { + "200": { + "body": { + "id": "99117812428622880", + "title": "Meeting with Alice and Bob", + "createdDateTime": "2022-05-26T05:46:17.8159131+00:00", + "validFrom": "2022-05-30T00:00:00+00:00", + "validUntil": "2022-06-30T00:00:00+00:00" + } + } + } +} diff --git a/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_RemoveAllParticipants.json b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_RemoveAllParticipants.json new file mode 100644 index 000000000000..2073819e152b --- /dev/null +++ b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_RemoveAllParticipants.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "endpoint": "https://contoso.communication.azure.com/", + "api-version": "2023-03-31-preview", + "roomId": "99199690362660524", + "patchParticipantsRequest": null + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_RemoveParticipants.json b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_RemoveParticipants.json new file mode 100644 index 000000000000..ab674b8eff8a --- /dev/null +++ b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_RemoveParticipants.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "endpoint": "https://contoso.communication.azure.com/", + "api-version": "2023-03-31-preview", + "roomId": "99199690362660524", + "patchParticipantsRequest": { + "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000666": null + } + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_UpdateParticipants.json b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_UpdateParticipants.json new file mode 100644 index 000000000000..d47665ace802 --- /dev/null +++ b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_UpdateParticipants.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "endpoint": "https://contoso.communication.azure.com/", + "api-version": "2023-03-31-preview", + "roomId": "99199690362660524", + "patchParticipantsRequest": { + "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000666": { + "role": "Attendee" + }, + "8:acs:db75ed0c-e801-41a3-99a4-66a0a119a06c_00000010-ce28-064a-83fe-084822000667": { + "role": "Presenter" + } + } + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_UpdateRoom.json b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_UpdateRoom.json new file mode 100644 index 000000000000..33514362c3e7 --- /dev/null +++ b/specification/communication/data-plane/Rooms/preview/2023-03-31-preview/examples/Rooms_UpdateRoom.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "endpoint": "https://contoso.communication.azure.com/", + "api-version": "2023-03-31-preview", + "roomId": "99199690362660524", + "patchRoomRequest": { + "title": "Meeting with Alice and Bob", + "validFrom": "2022-06-30T00:00:00Z", + "validUntil": "2022-07-30T00:00:00Z" + } + }, + "responses": { + "200": { + "body": { + "id": "99199690362660524", + "title": "Meeting with Alice and Bob", + "createdDateTime": "2022-05-26T01:37:00.659722+00:00", + "validFrom": "2022-06-30T00:00:00+00:00", + "validUntil": "2022-07-30T00:00:00+00:00" + } + } + } +} diff --git a/specification/communication/data-plane/Rooms/readme.md b/specification/communication/data-plane/Rooms/readme.md index 572f60a6956d..a7f7205f250b 100644 --- a/specification/communication/data-plane/Rooms/readme.md +++ b/specification/communication/data-plane/Rooms/readme.md @@ -26,18 +26,18 @@ These are the global settings for the communicationservices. ```yaml openapi-type: data-plane -tag: package-rooms-2022-02-01-preview +tag: package-rooms-2023-03-31-preview input-file: - - preview/2022-02-01-preview/communicationservicesrooms.json + - preview/2023-03-31-preview/communicationservicesrooms.json ``` -### Tag: package-rooms-2022-02-01-preview +### Tag: package-rooms-2023-03-31-preview -These settings apply only when `--tag=package-rooms-2022-02-01-preview` is specified on the command line. +These settings apply only when `--tag=package-rooms-2023-03-31-preview` is specified on the command line. -```yaml $(tag) == 'package-rooms-2022-02-01-preview' +```yaml $(tag) == 'package-rooms-2023-03-31-preview' input-file: - - preview/2022-02-01-preview/communicationservicesrooms.json + - preview/2023-03-31-preview/communicationservicesrooms.json title: Azure Communication Services ``` \ No newline at end of file