From 144c9c1c3fd5feb45a8221a64d5c8629fcfc6517 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 10 Nov 2023 11:40:06 +0100 Subject: [PATCH 1/3] fix(openapi): Reorganize openapi specs Signed-off-by: Joas Schilling --- lib/Controller/BotController.php | 5 +++++ lib/Controller/CertificateController.php | 2 ++ lib/Controller/CommandController.php | 4 ++-- lib/Controller/FederationController.php | 4 ++-- lib/Controller/HostedSignalingServerController.php | 4 ++-- lib/Controller/MatterbridgeSettingsController.php | 3 +++ lib/Controller/PageController.php | 4 ++-- lib/Controller/PublicShareAuthController.php | 2 ++ lib/Controller/RecordingController.php | 6 ++++-- lib/Controller/RoomController.php | 13 ++++++++----- lib/Controller/SettingsController.php | 2 ++ lib/Controller/SignalingController.php | 8 ++++++-- lib/Controller/TempAvatarController.php | 3 +++ 13 files changed, 43 insertions(+), 17 deletions(-) diff --git a/lib/Controller/BotController.php b/lib/Controller/BotController.php index 356cb2cf765..b71342518c5 100644 --- a/lib/Controller/BotController.php +++ b/lib/Controller/BotController.php @@ -48,6 +48,7 @@ use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\BruteForceProtection; use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Utility\ITimeFactory; @@ -140,6 +141,7 @@ protected function getBotFromHeaders(string $token, string $message): Bot { * 413: Message too long */ #[BruteForceProtection(action: 'bot')] + #[OpenAPI(scope: 'bots')] #[PublicPage] public function sendMessage(string $token, string $message, string $referenceId = '', int $replyTo = 0, bool $silent = false): DataResponse { if (trim($message) === '') { @@ -202,6 +204,7 @@ public function sendMessage(string $token, string $message, string $referenceId * 404: Reaction not found */ #[BruteForceProtection(action: 'bot')] + #[OpenAPI(scope: 'bots')] #[PublicPage] public function react(string $token, int $messageId, string $reaction): DataResponse { try { @@ -254,6 +257,7 @@ public function react(string $token, int $messageId, string $reaction): DataResp * 404: Reaction not found */ #[BruteForceProtection(action: 'bot')] + #[OpenAPI(scope: 'bots')] #[PublicPage] public function deleteReaction(string $token, int $messageId, string $reaction): DataResponse { try { @@ -297,6 +301,7 @@ public function deleteReaction(string $token, int $messageId, string $reaction): * * 200: Bot list returned */ + #[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['settings'])] public function adminListBots(): DataResponse { $data = []; $bots = $this->botServerMapper->getAllBots(); diff --git a/lib/Controller/CertificateController.php b/lib/Controller/CertificateController.php index 54a92d5666c..f7dbf9acd16 100644 --- a/lib/Controller/CertificateController.php +++ b/lib/Controller/CertificateController.php @@ -28,6 +28,7 @@ use OCA\Talk\Service\CertificateService; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\IL10N; @@ -53,6 +54,7 @@ public function __construct( * 200: Certificate expiration returned * 400: Getting certificate expiration is not possible */ + #[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['settings'])] public function getCertificateExpiration(string $host): DataResponse { try { $expirationInDays = $this->certificateService->getCertificateExpirationInDays($host); diff --git a/lib/Controller/CommandController.php b/lib/Controller/CommandController.php index 751524e107e..230e4bce8d4 100644 --- a/lib/Controller/CommandController.php +++ b/lib/Controller/CommandController.php @@ -28,7 +28,7 @@ use OCA\Talk\Model\Command; use OCA\Talk\Service\CommandService; -use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\IRequest; @@ -46,7 +46,7 @@ public function __construct( /** * @deprecated Commands are deprecated in favor of Bots */ - #[IgnoreOpenAPI] + #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] public function index(): DataResponse { $commands = $this->commandService->findAll(); diff --git a/lib/Controller/FederationController.php b/lib/Controller/FederationController.php index 4f1e97173ff..fc9417b934b 100644 --- a/lib/Controller/FederationController.php +++ b/lib/Controller/FederationController.php @@ -35,8 +35,8 @@ use OCA\Talk\ResponseDefinitions; use OCP\AppFramework\Db\MultipleObjectsReturnedException; use OCP\AppFramework\Http; -use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\DB\Exception as DBException; @@ -49,7 +49,7 @@ * * @psalm-import-type TalkFederationInvite from ResponseDefinitions */ -#[IgnoreOpenAPI] +#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] class FederationController extends OCSController { public function __construct( diff --git a/lib/Controller/HostedSignalingServerController.php b/lib/Controller/HostedSignalingServerController.php index 0184d43abbc..630aaa5f26b 100644 --- a/lib/Controller/HostedSignalingServerController.php +++ b/lib/Controller/HostedSignalingServerController.php @@ -32,7 +32,7 @@ use OCA\Talk\Exceptions\HostedSignalingServerInputException; use OCA\Talk\Service\HostedSignalingServerService; use OCP\AppFramework\Http; -use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; @@ -64,7 +64,7 @@ public function __construct( * 200: Authentication credentials returned * 412: Getting authentication credentials is not possible */ - #[IgnoreOpenAPI] + #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] #[PublicPage] public function auth(): DataResponse { $storedNonce = $this->config->getAppValue('spreed', 'hosted-signaling-server-nonce', ''); diff --git a/lib/Controller/MatterbridgeSettingsController.php b/lib/Controller/MatterbridgeSettingsController.php index 83ef3919218..d74b812b6b6 100644 --- a/lib/Controller/MatterbridgeSettingsController.php +++ b/lib/Controller/MatterbridgeSettingsController.php @@ -30,6 +30,7 @@ use OCA\Talk\Exceptions\WrongPermissionsException; use OCA\Talk\MatterbridgeManager; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\IRequest; @@ -52,6 +53,7 @@ public function __construct( * 200: Bridge version returned * 400: Getting bridge version is not possible */ + #[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['matterbridge'])] public function getMatterbridgeVersion(): DataResponse { try { $version = $this->bridgeManager->getCurrentVersionFromBinary(); @@ -79,6 +81,7 @@ public function getMatterbridgeVersion(): DataResponse { * 200: All bridges stopped successfully * 406: Stopping all bridges is not possible */ + #[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['matterbridge'])] public function stopAllBridges(): DataResponse { try { $success = $this->bridgeManager->stopAllBridges(); diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 537bd4339cc..c29bb99f412 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -42,8 +42,8 @@ use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\BruteForceProtection; -use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; use OCP\AppFramework\Http\Attribute\NoCSRFRequired; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\Attribute\UseSession; use OCP\AppFramework\Http\ContentSecurityPolicy; @@ -69,7 +69,7 @@ use OCP\Security\Bruteforce\IThrottler; use Psr\Log\LoggerInterface; -#[IgnoreOpenAPI] +#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] class PageController extends Controller { use TInitialState; diff --git a/lib/Controller/PublicShareAuthController.php b/lib/Controller/PublicShareAuthController.php index e7bcfea07ab..1f00e943c62 100644 --- a/lib/Controller/PublicShareAuthController.php +++ b/lib/Controller/PublicShareAuthController.php @@ -29,6 +29,7 @@ use OCA\Talk\Room; use OCA\Talk\Service\RoomService; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; @@ -71,6 +72,7 @@ public function __construct( * 404: Share not found */ #[PublicPage] + #[OpenAPI(tags: ['files_integration'])] public function createRoom(string $shareToken): DataResponse { try { $share = $this->shareManager->getShareByToken($shareToken); diff --git a/lib/Controller/RecordingController.php b/lib/Controller/RecordingController.php index e612e9f3d7b..bfc30ab01d4 100644 --- a/lib/Controller/RecordingController.php +++ b/lib/Controller/RecordingController.php @@ -42,8 +42,8 @@ use OCA\Talk\Service\RoomService; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\BruteForceProtection; -use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\DataResponse; use OCP\Http\Client\IClientService; @@ -77,6 +77,7 @@ public function __construct( * 200: Welcome message returned * 404: Recording server not found or not configured */ + #[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['settings'])] public function getWelcomeMessage(int $serverId): DataResponse { $recordingServers = $this->talkConfig->getRecordingServers(); if (empty($recordingServers) || !isset($recordingServers[$serverId])) { @@ -175,7 +176,7 @@ protected function getInputStream(): string { * 403: Missing permissions to update recording status * 404: Room not found */ - #[IgnoreOpenAPI] + #[OpenAPI(scope: 'backend-recording')] #[PublicPage] #[BruteForceProtection(action: 'talkRecordingSecret')] public function backend(): DataResponse { @@ -366,6 +367,7 @@ public function stop(): DataResponse { */ #[PublicPage] #[BruteForceProtection(action: 'talkRecordingSecret')] + #[OpenAPI(scope: 'backend-recording')] #[RequireRoom] public function store(string $owner): DataResponse { $data = $this->room->getToken(); diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index 64235d43218..c7fa4488d19 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -66,8 +66,8 @@ use OCP\App\IAppManager; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\BruteForceProtection; -use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Utility\ITimeFactory; @@ -311,6 +311,8 @@ public function getBreakoutRooms(): DataResponse { #[BruteForceProtection(action: 'talkFederationAccess')] #[BruteForceProtection(action: 'talkRoomToken')] #[BruteForceProtection(action: 'talkSipBridgeSecret')] + #[OpenAPI] + #[OpenAPI(scope: 'backend-sipbridge')] public function getSingleRoom(string $token): DataResponse { try { $isSIPBridgeRequest = $this->validateSIPBridgeRequest($token); @@ -1528,9 +1530,9 @@ public function joinRoom(string $token, string $password = '', bool $force = tru * 404: Participant not found * 501: SIP dial-in is not configured */ - #[IgnoreOpenAPI] #[PublicPage] #[BruteForceProtection(action: 'talkSipBridgeSecret')] + #[OpenAPI(scope: 'backend-sipbridge')] #[RequireRoom] public function verifyDialInPin(string $pin): DataResponse { try { @@ -1568,11 +1570,12 @@ public function verifyDialInPin(string $pin): DataResponse { * 200: Participant created successfully * 400: Phone number and details could not be confirmed * 401: SIP request invalid + * 404: Phone number is not invited as a participant * 501: SIP dial-out is not configured */ - #[IgnoreOpenAPI] #[PublicPage] #[BruteForceProtection(action: 'talkSipBridgeSecret')] + #[OpenAPI(scope: 'backend-sipbridge')] #[RequireRoom] public function verifyDialOutNumber(string $number, array $options = []): DataResponse { try { @@ -1617,9 +1620,9 @@ public function verifyDialOutNumber(string $number, array $options = []): DataRe * 400: SIP not enabled * 401: SIP request invalid */ - #[IgnoreOpenAPI] #[PublicPage] #[BruteForceProtection(action: 'talkSipBridgeSecret')] + #[OpenAPI(scope: 'backend-sipbridge')] #[RequireRoom] public function createGuestByDialIn(): DataResponse { try { @@ -1656,9 +1659,9 @@ public function createGuestByDialIn(): DataResponse { * 404: Participant was not found * 501: SIP dial-out is not configured */ - #[IgnoreOpenAPI] #[PublicPage] #[BruteForceProtection(action: 'talkSipBridgeSecret')] + #[OpenAPI(scope: 'backend-sipbridge')] #[RequireRoom] public function rejectedDialOutRequest(string $callId, array $options = []): DataResponse { try { diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 245103de216..629dbac1a96 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -32,6 +32,7 @@ use OCA\Talk\Service\ParticipantService; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\Files\Folder; @@ -129,6 +130,7 @@ protected function validateUserSetting(string $setting, $value): bool { * * 200: Successfully set new SIP settings */ + #[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['settings'])] public function setSIPSettings( array $sipGroups = [], string $dialInInfo = '', diff --git a/lib/Controller/SignalingController.php b/lib/Controller/SignalingController.php index 52850f71c14..cf05d3a8864 100644 --- a/lib/Controller/SignalingController.php +++ b/lib/Controller/SignalingController.php @@ -45,7 +45,7 @@ use OCA\Talk\TalkSession; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\BruteForceProtection; -use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; @@ -129,6 +129,7 @@ private function validateRecordingBackendRequest(string $data): bool { #[PublicPage] #[BruteForceProtection(action: 'talkRoomToken')] #[BruteForceProtection(action: 'talkRecordingSecret')] + #[OpenAPI(tags: ['internal_signaling', 'external_signaling'])] public function getSettings(string $token = ''): DataResponse { $isRecordingRequest = false; @@ -226,6 +227,7 @@ public function getSettings(string $token = ''): DataResponse { * 200: Welcome message returned * 404: Signaling server not found */ + #[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['settings'])] public function getWelcomeMessage(int $serverId): DataResponse { $signalingServers = $this->talkConfig->getSignalingServers(); if (empty($signalingServers) || !isset($signalingServers[$serverId])) { @@ -313,6 +315,7 @@ public function getWelcomeMessage(int $serverId): DataResponse { * 400: Sending signaling message is not possible */ #[PublicPage] + #[OpenAPI(tags: ['internal_signaling'])] public function sendMessages(string $token, string $messages): DataResponse { if ($this->talkConfig->getSignalingMode() !== Config::SIGNALING_INTERNAL) { return new DataResponse('Internal signaling disabled.', Http::STATUS_BAD_REQUEST); @@ -364,6 +367,7 @@ public function sendMessages(string $token, string $messages): DataResponse { * 409: Session killed */ #[PublicPage] + #[OpenAPI(tags: ['internal_signaling'])] public function pullMessages(string $token): DataResponse { if ($this->talkConfig->getSignalingMode() !== Config::SIGNALING_INTERNAL) { return new DataResponse('Internal signaling disabled.', Http::STATUS_BAD_REQUEST); @@ -543,7 +547,7 @@ protected function getInputStream(): string { * * 200: Always, sorry about that */ - #[IgnoreOpenAPI] + #[OpenAPI(scope: 'backend-signaling')] #[PublicPage] #[BruteForceProtection(action: 'talkSignalingSecret')] public function backend(): DataResponse { diff --git a/lib/Controller/TempAvatarController.php b/lib/Controller/TempAvatarController.php index f9053247158..48dca5140a7 100644 --- a/lib/Controller/TempAvatarController.php +++ b/lib/Controller/TempAvatarController.php @@ -30,6 +30,7 @@ use OC\NotSquareException; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\IAvatarManager; @@ -59,6 +60,7 @@ public function __construct( * 400: Uploading avatar is not possible */ #[NoAdminRequired] + #[OpenAPI(tags: ['user_avatar'])] public function postAvatar(): DataResponse { $files = $this->request->getUploadedFile('files'); @@ -133,6 +135,7 @@ public function postAvatar(): DataResponse { * 400: Deleting avatar is not possible */ #[NoAdminRequired] + #[OpenAPI(tags: ['user_avatar'])] public function deleteAvatar(): DataResponse { try { $avatar = $this->avatarManager->getAvatar($this->userId); From ae568ed5e6a48473232bade7b08c49058db3e0ff Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 18 Jan 2024 11:40:44 +0100 Subject: [PATCH 2/3] fix(openapi): Update extractor Signed-off-by: Joas Schilling --- vendor-bin/openapi-extractor/composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor-bin/openapi-extractor/composer.lock b/vendor-bin/openapi-extractor/composer.lock index b4457557b1c..7c522a25bc3 100644 --- a/vendor-bin/openapi-extractor/composer.lock +++ b/vendor-bin/openapi-extractor/composer.lock @@ -83,12 +83,12 @@ "source": { "type": "git", "url": "https://github.com/nextcloud/openapi-extractor.git", - "reference": "f73b854a0a4d08e9ada2cf467b5ab8813e9108c3" + "reference": "c69ac976c236e13b8063d069917190f910545dff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/openapi-extractor/zipball/f73b854a0a4d08e9ada2cf467b5ab8813e9108c3", - "reference": "f73b854a0a4d08e9ada2cf467b5ab8813e9108c3", + "url": "https://api.github.com/repos/nextcloud/openapi-extractor/zipball/c69ac976c236e13b8063d069917190f910545dff", + "reference": "c69ac976c236e13b8063d069917190f910545dff", "shasum": "" }, "require": { @@ -130,7 +130,7 @@ "source": "https://github.com/nextcloud/openapi-extractor/tree/main", "issues": "https://github.com/nextcloud/openapi-extractor/issues" }, - "time": "2024-01-10T10:48:43+00:00" + "time": "2024-01-18T14:30:25+00:00" }, { "name": "nikic/php-parser", From bac9eb8652e009c8e13b52d0c6815bc0432740e0 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 18 Jan 2024 11:43:00 +0100 Subject: [PATCH 3/3] chore(assets): Recreate openapi specs Signed-off-by: Joas Schilling --- openapi-administration.json | 1504 +++ openapi-backend-recording.json | 648 ++ openapi-backend-signaling.json | 382 + openapi-backend-sipbridge.json | 1656 +++ openapi-bots.json | 836 ++ openapi-full.json | 19177 +++++++++++++++++++++++++++++++ openapi.json | 7004 ++++------- 7 files changed, 26662 insertions(+), 4545 deletions(-) create mode 100644 openapi-administration.json create mode 100644 openapi-backend-recording.json create mode 100644 openapi-backend-signaling.json create mode 100644 openapi-backend-sipbridge.json create mode 100644 openapi-bots.json create mode 100644 openapi-full.json diff --git a/openapi-administration.json b/openapi-administration.json new file mode 100644 index 00000000000..a83268f9d6e --- /dev/null +++ b/openapi-administration.json @@ -0,0 +1,1504 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "spreed-administration", + "version": "0.0.1", + "description": "Chat, video & audio-conferencing using WebRTC", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Bot": { + "type": "object", + "required": [ + "description", + "id", + "name", + "state" + ], + "properties": { + "description": { + "type": "string", + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "state": { + "type": "integer", + "format": "int64" + } + } + }, + "BotWithDetails": { + "allOf": [ + { + "$ref": "#/components/schemas/Bot" + }, + { + "type": "object", + "required": [ + "error_count", + "features", + "last_error_date", + "last_error_message", + "url", + "url_hash" + ], + "properties": { + "error_count": { + "type": "integer", + "format": "int64" + }, + "features": { + "type": "integer", + "format": "int64" + }, + "last_error_date": { + "type": "integer", + "format": "int64" + }, + "last_error_message": { + "type": "string" + }, + "url": { + "type": "string" + }, + "url_hash": { + "type": "string" + } + } + } + ] + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "PublicCapabilities": { + "oneOf": [ + { + "type": "object", + "required": [ + "spreed" + ], + "properties": { + "spreed": { + "type": "object", + "required": [ + "features", + "config", + "version" + ], + "properties": { + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "required": [ + "attachments", + "call", + "chat", + "conversations", + "previews", + "signaling" + ], + "properties": { + "attachments": { + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "type": "boolean" + }, + "folder": { + "type": "string" + } + } + }, + "call": { + "type": "object", + "required": [ + "enabled", + "breakout-rooms", + "recording", + "recording-consent", + "supported-reactions", + "predefined-backgrounds", + "can-upload-background", + "sip-enabled", + "sip-dialout-enabled", + "can-enable-sip" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "breakout-rooms": { + "type": "boolean" + }, + "recording": { + "type": "boolean" + }, + "recording-consent": { + "type": "integer", + "format": "int64" + }, + "supported-reactions": { + "type": "array", + "items": { + "type": "string" + } + }, + "predefined-backgrounds": { + "type": "array", + "items": { + "type": "string" + } + }, + "can-upload-background": { + "type": "boolean" + }, + "sip-enabled": { + "type": "boolean" + }, + "sip-dialout-enabled": { + "type": "boolean" + }, + "can-enable-sip": { + "type": "boolean" + } + } + }, + "chat": { + "type": "object", + "required": [ + "max-length", + "read-privacy", + "has-translation-providers", + "typing-privacy" + ], + "properties": { + "max-length": { + "type": "integer", + "format": "int64" + }, + "read-privacy": { + "type": "integer", + "format": "int64" + }, + "has-translation-providers": { + "type": "boolean" + }, + "typing-privacy": { + "type": "integer", + "format": "int64" + } + } + }, + "conversations": { + "type": "object", + "required": [ + "can-create" + ], + "properties": { + "can-create": { + "type": "boolean" + } + } + }, + "previews": { + "type": "object", + "required": [ + "max-gif-size" + ], + "properties": { + "max-gif-size": { + "type": "integer", + "format": "int64" + } + } + }, + "signaling": { + "type": "object", + "required": [ + "session-ping-limit" + ], + "properties": { + "session-ping-limit": { + "type": "integer", + "format": "int64" + }, + "hello-v2-token-key": { + "type": "string" + } + } + } + } + }, + "version": { + "type": "string" + } + } + } + } + }, + { + "type": "array", + "maxLength": 0 + } + ] + } + } + }, + "paths": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/admin": { + "get": { + "operationId": "settings-admin-list-bots", + "summary": "List admin bots", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Bot list returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BotWithDetails" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/certificate/expiration": { + "get": { + "operationId": "settings-get-certificate-expiration", + "summary": "Get the certificate expiration for a host", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "host", + "in": "query", + "description": "Host to check", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Certificate expiration returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "expiration_in_days" + ], + "properties": { + "expiration_in_days": { + "type": "integer", + "format": "int64", + "nullable": true + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Getting certificate expiration is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/hostedsignalingserver/requesttrial": { + "post": { + "operationId": "hosted_signaling_server-request-trial", + "summary": "Request a trial account", + "description": "This endpoint requires admin access", + "tags": [ + "hosted_signaling_server" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "url", + "in": "query", + "description": "Server URL", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "Display name of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "email", + "in": "query", + "description": "Email of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "language", + "in": "query", + "description": "Language of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "country", + "in": "query", + "description": "Country of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Trial requested successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Requesting trial is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/hostedsignalingserver/delete": { + "delete": { + "operationId": "hosted_signaling_server-delete-account", + "summary": "Delete the account", + "description": "This endpoint requires admin access", + "tags": [ + "hosted_signaling_server" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "204": { + "description": "Account deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Deleting account is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge": { + "delete": { + "operationId": "matterbridge-stop-all-bridges", + "summary": "Stop all bridges", + "description": "This endpoint requires admin access", + "tags": [ + "matterbridge" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "All bridges stopped successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "406": { + "description": "Stopping all bridges is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/version": { + "get": { + "operationId": "matterbridge-get-matterbridge-version", + "summary": "Get Matterbridge version", + "description": "This endpoint requires admin access", + "tags": [ + "matterbridge" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Bridge version returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Getting bridge version is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/welcome/{serverId}": { + "get": { + "operationId": "settings-get-welcome-message", + "summary": "Get the welcome message of a recording server", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "serverId", + "in": "path", + "description": "ID of the server", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Welcome message returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "number", + "format": "float" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Recording server not found or not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/settings/sip": { + "post": { + "operationId": "settings-setsip-settings", + "summary": "Update SIP bridge settings", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "sipGroups[]", + "in": "query", + "description": "New SIP groups", + "schema": { + "type": "array", + "default": [], + "items": { + "type": "string" + } + } + }, + { + "name": "dialInInfo", + "in": "query", + "description": "New dial info", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sharedSecret", + "in": "query", + "description": "New shared secret", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Successfully set new SIP settings", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/welcome/{serverId}": { + "get": { + "operationId": "settings-get-welcome-message", + "summary": "Get the welcome message from a signaling server", + "description": "Only available for logged-in users because guests can not use the apps right now.\nThis endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v3" + ], + "default": "v3" + } + }, + { + "name": "serverId", + "in": "path", + "description": "ID of the signaling server", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Welcome message returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Signaling server not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + }, + "version": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/openapi-backend-recording.json b/openapi-backend-recording.json new file mode 100644 index 00000000000..14d7d1481de --- /dev/null +++ b/openapi-backend-recording.json @@ -0,0 +1,648 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "spreed-backend-recording", + "version": "0.0.1", + "description": "Chat, video & audio-conferencing using WebRTC", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "PublicCapabilities": { + "oneOf": [ + { + "type": "object", + "required": [ + "spreed" + ], + "properties": { + "spreed": { + "type": "object", + "required": [ + "features", + "config", + "version" + ], + "properties": { + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "required": [ + "attachments", + "call", + "chat", + "conversations", + "previews", + "signaling" + ], + "properties": { + "attachments": { + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "type": "boolean" + }, + "folder": { + "type": "string" + } + } + }, + "call": { + "type": "object", + "required": [ + "enabled", + "breakout-rooms", + "recording", + "recording-consent", + "supported-reactions", + "predefined-backgrounds", + "can-upload-background", + "sip-enabled", + "sip-dialout-enabled", + "can-enable-sip" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "breakout-rooms": { + "type": "boolean" + }, + "recording": { + "type": "boolean" + }, + "recording-consent": { + "type": "integer", + "format": "int64" + }, + "supported-reactions": { + "type": "array", + "items": { + "type": "string" + } + }, + "predefined-backgrounds": { + "type": "array", + "items": { + "type": "string" + } + }, + "can-upload-background": { + "type": "boolean" + }, + "sip-enabled": { + "type": "boolean" + }, + "sip-dialout-enabled": { + "type": "boolean" + }, + "can-enable-sip": { + "type": "boolean" + } + } + }, + "chat": { + "type": "object", + "required": [ + "max-length", + "read-privacy", + "has-translation-providers", + "typing-privacy" + ], + "properties": { + "max-length": { + "type": "integer", + "format": "int64" + }, + "read-privacy": { + "type": "integer", + "format": "int64" + }, + "has-translation-providers": { + "type": "boolean" + }, + "typing-privacy": { + "type": "integer", + "format": "int64" + } + } + }, + "conversations": { + "type": "object", + "required": [ + "can-create" + ], + "properties": { + "can-create": { + "type": "boolean" + } + } + }, + "previews": { + "type": "object", + "required": [ + "max-gif-size" + ], + "properties": { + "max-gif-size": { + "type": "integer", + "format": "int64" + } + } + }, + "signaling": { + "type": "object", + "required": [ + "session-ping-limit" + ], + "properties": { + "session-ping-limit": { + "type": "integer", + "format": "int64" + }, + "hello-v2-token-key": { + "type": "string" + } + } + } + } + }, + "version": { + "type": "string" + } + } + } + } + }, + { + "type": "array", + "maxLength": 0 + } + ] + } + } + }, + "paths": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/backend": { + "post": { + "operationId": "recording-backend", + "summary": "Update the recording status as a backend", + "tags": [ + "recording" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Recording status updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating recording status is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "type", + "error" + ], + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to update recording status", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "type", + "error" + ], + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Room not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "type", + "error" + ], + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/store": { + "post": { + "operationId": "recording-store", + "summary": "Store the recording", + "tags": [ + "recording" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "owner", + "in": "query", + "description": "User that will own the recording file", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Recording stored successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Storing recording is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Missing permissions to store recording", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "type", + "error" + ], + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/openapi-backend-signaling.json b/openapi-backend-signaling.json new file mode 100644 index 00000000000..e39b8deee0e --- /dev/null +++ b/openapi-backend-signaling.json @@ -0,0 +1,382 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "spreed-backend-signaling", + "version": "0.0.1", + "description": "Chat, video & audio-conferencing using WebRTC", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "PublicCapabilities": { + "oneOf": [ + { + "type": "object", + "required": [ + "spreed" + ], + "properties": { + "spreed": { + "type": "object", + "required": [ + "features", + "config", + "version" + ], + "properties": { + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "required": [ + "attachments", + "call", + "chat", + "conversations", + "previews", + "signaling" + ], + "properties": { + "attachments": { + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "type": "boolean" + }, + "folder": { + "type": "string" + } + } + }, + "call": { + "type": "object", + "required": [ + "enabled", + "breakout-rooms", + "recording", + "recording-consent", + "supported-reactions", + "predefined-backgrounds", + "can-upload-background", + "sip-enabled", + "sip-dialout-enabled", + "can-enable-sip" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "breakout-rooms": { + "type": "boolean" + }, + "recording": { + "type": "boolean" + }, + "recording-consent": { + "type": "integer", + "format": "int64" + }, + "supported-reactions": { + "type": "array", + "items": { + "type": "string" + } + }, + "predefined-backgrounds": { + "type": "array", + "items": { + "type": "string" + } + }, + "can-upload-background": { + "type": "boolean" + }, + "sip-enabled": { + "type": "boolean" + }, + "sip-dialout-enabled": { + "type": "boolean" + }, + "can-enable-sip": { + "type": "boolean" + } + } + }, + "chat": { + "type": "object", + "required": [ + "max-length", + "read-privacy", + "has-translation-providers", + "typing-privacy" + ], + "properties": { + "max-length": { + "type": "integer", + "format": "int64" + }, + "read-privacy": { + "type": "integer", + "format": "int64" + }, + "has-translation-providers": { + "type": "boolean" + }, + "typing-privacy": { + "type": "integer", + "format": "int64" + } + } + }, + "conversations": { + "type": "object", + "required": [ + "can-create" + ], + "properties": { + "can-create": { + "type": "boolean" + } + } + }, + "previews": { + "type": "object", + "required": [ + "max-gif-size" + ], + "properties": { + "max-gif-size": { + "type": "integer", + "format": "int64" + } + } + }, + "signaling": { + "type": "object", + "required": [ + "session-ping-limit" + ], + "properties": { + "session-ping-limit": { + "type": "integer", + "format": "int64" + }, + "hello-v2-token-key": { + "type": "string" + } + } + } + } + }, + "version": { + "type": "string" + } + } + } + } + }, + { + "type": "array", + "maxLength": 0 + } + ] + } + } + }, + "paths": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/backend": { + "post": { + "operationId": "signaling-backend", + "summary": "Backend API to query information required for standalone signaling servers", + "description": "See sections \"Backend validation\" in https://nextcloud-spreed-signaling.readthedocs.io/en/latest/standalone-signaling-api-v1/#backend-requests", + "tags": [ + "signaling" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v3" + ], + "default": "v3" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Always, sorry about that", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "auth": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "userid": { + "type": "string" + }, + "user": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "room": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "roomid": { + "type": "string" + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "session": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/openapi-backend-sipbridge.json b/openapi-backend-sipbridge.json new file mode 100644 index 00000000000..32805876afa --- /dev/null +++ b/openapi-backend-sipbridge.json @@ -0,0 +1,1656 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "spreed-backend-sipbridge", + "version": "0.0.1", + "description": "Chat, video & audio-conferencing using WebRTC", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "ChatMessage": { + "type": "object", + "required": [ + "actorDisplayName", + "actorId", + "actorType", + "expirationTimestamp", + "id", + "isReplyable", + "markdown", + "message", + "messageParameters", + "messageType", + "reactions", + "referenceId", + "systemMessage", + "timestamp", + "token" + ], + "properties": { + "actorDisplayName": { + "type": "string" + }, + "actorId": { + "type": "string" + }, + "actorType": { + "type": "string" + }, + "deleted": { + "type": "boolean", + "enum": [ + true + ] + }, + "expirationTimestamp": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "isReplyable": { + "type": "boolean" + }, + "markdown": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "messageParameters": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "messageType": { + "type": "string" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "referenceId": { + "type": "string" + }, + "systemMessage": { + "type": "string" + }, + "timestamp": { + "type": "integer", + "format": "int64" + }, + "token": { + "type": "string" + }, + "lastEditActorDisplayName": { + "type": "string" + }, + "lastEditActorId": { + "type": "string" + }, + "lastEditActorType": { + "type": "string" + }, + "lastEditTimestamp": { + "type": "integer", + "format": "int64" + } + } + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "PublicCapabilities": { + "oneOf": [ + { + "type": "object", + "required": [ + "spreed" + ], + "properties": { + "spreed": { + "type": "object", + "required": [ + "features", + "config", + "version" + ], + "properties": { + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "required": [ + "attachments", + "call", + "chat", + "conversations", + "previews", + "signaling" + ], + "properties": { + "attachments": { + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "type": "boolean" + }, + "folder": { + "type": "string" + } + } + }, + "call": { + "type": "object", + "required": [ + "enabled", + "breakout-rooms", + "recording", + "recording-consent", + "supported-reactions", + "predefined-backgrounds", + "can-upload-background", + "sip-enabled", + "sip-dialout-enabled", + "can-enable-sip" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "breakout-rooms": { + "type": "boolean" + }, + "recording": { + "type": "boolean" + }, + "recording-consent": { + "type": "integer", + "format": "int64" + }, + "supported-reactions": { + "type": "array", + "items": { + "type": "string" + } + }, + "predefined-backgrounds": { + "type": "array", + "items": { + "type": "string" + } + }, + "can-upload-background": { + "type": "boolean" + }, + "sip-enabled": { + "type": "boolean" + }, + "sip-dialout-enabled": { + "type": "boolean" + }, + "can-enable-sip": { + "type": "boolean" + } + } + }, + "chat": { + "type": "object", + "required": [ + "max-length", + "read-privacy", + "has-translation-providers", + "typing-privacy" + ], + "properties": { + "max-length": { + "type": "integer", + "format": "int64" + }, + "read-privacy": { + "type": "integer", + "format": "int64" + }, + "has-translation-providers": { + "type": "boolean" + }, + "typing-privacy": { + "type": "integer", + "format": "int64" + } + } + }, + "conversations": { + "type": "object", + "required": [ + "can-create" + ], + "properties": { + "can-create": { + "type": "boolean" + } + } + }, + "previews": { + "type": "object", + "required": [ + "max-gif-size" + ], + "properties": { + "max-gif-size": { + "type": "integer", + "format": "int64" + } + } + }, + "signaling": { + "type": "object", + "required": [ + "session-ping-limit" + ], + "properties": { + "session-ping-limit": { + "type": "integer", + "format": "int64" + }, + "hello-v2-token-key": { + "type": "string" + } + } + } + } + }, + "version": { + "type": "string" + } + } + } + } + }, + { + "type": "array", + "maxLength": 0 + } + ] + }, + "Room": { + "type": "object", + "required": [ + "actorId", + "actorType", + "attendeeId", + "attendeePermissions", + "attendeePin", + "avatarVersion", + "breakoutRoomMode", + "breakoutRoomStatus", + "callFlag", + "callPermissions", + "callRecording", + "callStartTime", + "canDeleteConversation", + "canEnableSIP", + "canLeaveConversation", + "canStartCall", + "defaultPermissions", + "description", + "displayName", + "hasCall", + "hasPassword", + "id", + "isCustomAvatar", + "isFavorite", + "lastActivity", + "lastCommonReadMessage", + "lastMessage", + "lastPing", + "lastReadMessage", + "listable", + "lobbyState", + "lobbyTimer", + "messageExpiration", + "name", + "notificationCalls", + "notificationLevel", + "objectId", + "objectType", + "participantFlags", + "participantType", + "permissions", + "readOnly", + "recordingConsent", + "sessionId", + "sipEnabled", + "token", + "type", + "unreadMention", + "unreadMentionDirect", + "unreadMessages" + ], + "properties": { + "actorId": { + "type": "string" + }, + "actorType": { + "type": "string" + }, + "attendeeId": { + "type": "integer", + "format": "int64" + }, + "attendeePermissions": { + "type": "integer", + "format": "int64" + }, + "attendeePin": { + "type": "string", + "nullable": true + }, + "avatarVersion": { + "type": "string" + }, + "breakoutRoomMode": { + "type": "integer", + "format": "int64" + }, + "breakoutRoomStatus": { + "type": "integer", + "format": "int64" + }, + "callFlag": { + "type": "integer", + "format": "int64" + }, + "callPermissions": { + "type": "integer", + "format": "int64" + }, + "callRecording": { + "type": "integer", + "format": "int64" + }, + "callStartTime": { + "type": "integer", + "format": "int64" + }, + "canDeleteConversation": { + "type": "boolean" + }, + "canEnableSIP": { + "type": "boolean" + }, + "canLeaveConversation": { + "type": "boolean" + }, + "canStartCall": { + "type": "boolean" + }, + "defaultPermissions": { + "type": "integer", + "format": "int64" + }, + "description": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "hasCall": { + "type": "boolean" + }, + "hasPassword": { + "type": "boolean" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "isCustomAvatar": { + "type": "boolean" + }, + "isFavorite": { + "type": "boolean" + }, + "lastActivity": { + "type": "integer", + "format": "int64" + }, + "lastCommonReadMessage": { + "type": "integer", + "format": "int64" + }, + "lastMessage": { + "oneOf": [ + { + "$ref": "#/components/schemas/ChatMessage" + }, + { + "type": "array", + "maxLength": 0 + } + ] + }, + "lastPing": { + "type": "integer", + "format": "int64" + }, + "lastReadMessage": { + "type": "integer", + "format": "int64" + }, + "listable": { + "type": "integer", + "format": "int64" + }, + "lobbyState": { + "type": "integer", + "format": "int64" + }, + "lobbyTimer": { + "type": "integer", + "format": "int64" + }, + "messageExpiration": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "notificationCalls": { + "type": "integer", + "format": "int64" + }, + "notificationLevel": { + "type": "integer", + "format": "int64" + }, + "objectId": { + "type": "string" + }, + "objectType": { + "type": "string" + }, + "participantFlags": { + "type": "integer", + "format": "int64" + }, + "participantType": { + "type": "integer", + "format": "int64" + }, + "permissions": { + "type": "integer", + "format": "int64" + }, + "readOnly": { + "type": "integer", + "format": "int64" + }, + "recordingConsent": { + "type": "integer", + "format": "int64" + }, + "sessionId": { + "type": "string" + }, + "sipEnabled": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string" + }, + "statusClearAt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "statusIcon": { + "type": "string", + "nullable": true + }, + "statusMessage": { + "type": "string", + "nullable": true + }, + "token": { + "type": "string" + }, + "type": { + "type": "integer", + "format": "int64" + }, + "unreadMention": { + "type": "boolean" + }, + "unreadMentionDirect": { + "type": "boolean" + }, + "unreadMessages": { + "type": "integer", + "format": "int64" + } + } + } + } + }, + "paths": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}": { + "get": { + "operationId": "room-get-single-room", + "summary": "Get a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "description": "Token of the room", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Room returned", + "headers": { + "X-Nextcloud-Talk-Hash": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Room not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/pin/{pin}": { + "get": { + "operationId": "room-verify-dial-in-pin", + "summary": "Verify a dial-in PIN (SIP bridge)", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "pin", + "in": "path", + "description": "PIN the participant used to dial-in", + "required": true, + "schema": { + "type": "string", + "pattern": "^\\d{7,32}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participant returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Participant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "501": { + "description": "SIP dial-in is not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/verify-dialin": { + "post": { + "operationId": "room-verify-dial-in-pin", + "summary": "Verify a dial-in PIN (SIP bridge)", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "pin", + "in": "query", + "description": "PIN the participant used to dial-in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participant returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Participant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "501": { + "description": "SIP dial-in is not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/verify-dialout": { + "post": { + "operationId": "room-verify-dial-out-number", + "summary": "Verify a dial-out number (SIP bridge)", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "number", + "in": "query", + "description": "E164 formatted phone number", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "options", + "in": "query", + "description": "Additional details to verify the validity of the request", + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participant created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Phone number and details could not be confirmed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Phone number is not invited as a participant", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "501": { + "description": "SIP dial-out is not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/open-dial-in": { + "post": { + "operationId": "room-create-guest-by-dial-in", + "summary": "Create a guest by their dial-in", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participant created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "SIP not enabled", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/rejected-dialout": { + "delete": { + "operationId": "room-rejected-dial-out-request", + "summary": "Reset call ID of a dial-out participant when the SIP gateway rejected it", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "callId", + "in": "query", + "description": "The call ID provided by the SIP bridge earlier to uniquely identify the call to terminate", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "options", + "in": "query", + "description": "Additional details to verify the validity of the request", + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Call ID reset", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Call ID mismatch or attendeeId not found in $options", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Participant was not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "501": { + "description": "SIP dial-out is not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/openapi-bots.json b/openapi-bots.json new file mode 100644 index 00000000000..035509861dd --- /dev/null +++ b/openapi-bots.json @@ -0,0 +1,836 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "spreed-bots", + "version": "0.0.1", + "description": "Chat, video & audio-conferencing using WebRTC", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "PublicCapabilities": { + "oneOf": [ + { + "type": "object", + "required": [ + "spreed" + ], + "properties": { + "spreed": { + "type": "object", + "required": [ + "features", + "config", + "version" + ], + "properties": { + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "required": [ + "attachments", + "call", + "chat", + "conversations", + "previews", + "signaling" + ], + "properties": { + "attachments": { + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "type": "boolean" + }, + "folder": { + "type": "string" + } + } + }, + "call": { + "type": "object", + "required": [ + "enabled", + "breakout-rooms", + "recording", + "recording-consent", + "supported-reactions", + "predefined-backgrounds", + "can-upload-background", + "sip-enabled", + "sip-dialout-enabled", + "can-enable-sip" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "breakout-rooms": { + "type": "boolean" + }, + "recording": { + "type": "boolean" + }, + "recording-consent": { + "type": "integer", + "format": "int64" + }, + "supported-reactions": { + "type": "array", + "items": { + "type": "string" + } + }, + "predefined-backgrounds": { + "type": "array", + "items": { + "type": "string" + } + }, + "can-upload-background": { + "type": "boolean" + }, + "sip-enabled": { + "type": "boolean" + }, + "sip-dialout-enabled": { + "type": "boolean" + }, + "can-enable-sip": { + "type": "boolean" + } + } + }, + "chat": { + "type": "object", + "required": [ + "max-length", + "read-privacy", + "has-translation-providers", + "typing-privacy" + ], + "properties": { + "max-length": { + "type": "integer", + "format": "int64" + }, + "read-privacy": { + "type": "integer", + "format": "int64" + }, + "has-translation-providers": { + "type": "boolean" + }, + "typing-privacy": { + "type": "integer", + "format": "int64" + } + } + }, + "conversations": { + "type": "object", + "required": [ + "can-create" + ], + "properties": { + "can-create": { + "type": "boolean" + } + } + }, + "previews": { + "type": "object", + "required": [ + "max-gif-size" + ], + "properties": { + "max-gif-size": { + "type": "integer", + "format": "int64" + } + } + }, + "signaling": { + "type": "object", + "required": [ + "session-ping-limit" + ], + "properties": { + "session-ping-limit": { + "type": "integer", + "format": "int64" + }, + "hello-v2-token-key": { + "type": "string" + } + } + } + } + }, + "version": { + "type": "string" + } + } + } + } + }, + { + "type": "array", + "maxLength": 0 + } + ] + } + } + }, + "paths": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/message": { + "post": { + "operationId": "bot-send-message", + "summary": "Sends a new chat message to the given room", + "description": "The author and timestamp are automatically set to the current user/guest and time.", + "tags": [ + "bot" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "message", + "in": "query", + "description": "The message to send", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "referenceId", + "in": "query", + "description": "For the message to be able to later identify it again", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "replyTo", + "in": "query", + "description": "Parent id which this message is a reply to", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "silent", + "in": "query", + "description": "If sent silent the chat message will not create any notifications", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "description": "Conversation token", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Message sent successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "When the replyTo is invalid or message is empty", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Sending message is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/reaction/{messageId}": { + "post": { + "operationId": "bot-react", + "summary": "Adds a reaction to a chat message", + "tags": [ + "bot" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "reaction", + "in": "query", + "description": "Reaction to add", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "description": "Conversation token", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Reaction already exists", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "201": { + "description": "Reacted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Reacting is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Reacting is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Reaction not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "bot-delete-reaction", + "summary": "Deletes a reaction from a chat message", + "tags": [ + "bot" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "reaction", + "in": "query", + "description": "Reaction to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "description": "Conversation token", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Reaction deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Reacting is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Reaction not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Reacting is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/openapi-full.json b/openapi-full.json new file mode 100644 index 00000000000..b62ebb4c7e6 --- /dev/null +++ b/openapi-full.json @@ -0,0 +1,19177 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "spreed-full", + "version": "0.0.1", + "description": "Chat, video & audio-conferencing using WebRTC", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Bot": { + "type": "object", + "required": [ + "description", + "id", + "name", + "state" + ], + "properties": { + "description": { + "type": "string", + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "state": { + "type": "integer", + "format": "int64" + } + } + }, + "BotWithDetails": { + "allOf": [ + { + "$ref": "#/components/schemas/Bot" + }, + { + "type": "object", + "required": [ + "error_count", + "features", + "last_error_date", + "last_error_message", + "url", + "url_hash" + ], + "properties": { + "error_count": { + "type": "integer", + "format": "int64" + }, + "features": { + "type": "integer", + "format": "int64" + }, + "last_error_date": { + "type": "integer", + "format": "int64" + }, + "last_error_message": { + "type": "string" + }, + "url": { + "type": "string" + }, + "url_hash": { + "type": "string" + } + } + } + ] + }, + "BotWithDetailsAndSecret": { + "allOf": [ + { + "$ref": "#/components/schemas/BotWithDetails" + }, + { + "type": "object", + "required": [ + "secret" + ], + "properties": { + "secret": { + "type": "string" + } + } + } + ] + }, + "CallPeer": { + "type": "object", + "required": [ + "actorId", + "actorType", + "displayName", + "lastPing", + "sessionId", + "token" + ], + "properties": { + "actorId": { + "type": "string" + }, + "actorType": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "lastPing": { + "type": "integer", + "format": "int64" + }, + "sessionId": { + "type": "string" + }, + "token": { + "type": "string" + } + } + }, + "ChatMentionSuggestion": { + "type": "object", + "required": [ + "id", + "label", + "source", + "status", + "statusClearAt", + "statusIcon", + "statusMessage" + ], + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "source": { + "type": "string" + }, + "status": { + "type": "string", + "nullable": true + }, + "statusClearAt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "statusIcon": { + "type": "string", + "nullable": true + }, + "statusMessage": { + "type": "string", + "nullable": true + } + } + }, + "ChatMessage": { + "type": "object", + "required": [ + "actorDisplayName", + "actorId", + "actorType", + "expirationTimestamp", + "id", + "isReplyable", + "markdown", + "message", + "messageParameters", + "messageType", + "reactions", + "referenceId", + "systemMessage", + "timestamp", + "token" + ], + "properties": { + "actorDisplayName": { + "type": "string" + }, + "actorId": { + "type": "string" + }, + "actorType": { + "type": "string" + }, + "deleted": { + "type": "boolean", + "enum": [ + true + ] + }, + "expirationTimestamp": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "isReplyable": { + "type": "boolean" + }, + "markdown": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "messageParameters": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "messageType": { + "type": "string" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "referenceId": { + "type": "string" + }, + "systemMessage": { + "type": "string" + }, + "timestamp": { + "type": "integer", + "format": "int64" + }, + "token": { + "type": "string" + }, + "lastEditActorDisplayName": { + "type": "string" + }, + "lastEditActorId": { + "type": "string" + }, + "lastEditActorType": { + "type": "string" + }, + "lastEditTimestamp": { + "type": "integer", + "format": "int64" + } + } + }, + "ChatMessageWithParent": { + "allOf": [ + { + "$ref": "#/components/schemas/ChatMessage" + }, + { + "type": "object", + "properties": { + "parent": { + "$ref": "#/components/schemas/ChatMessage" + } + } + } + ] + }, + "ChatReminder": { + "type": "object", + "required": [ + "messageId", + "timestamp", + "token", + "userId" + ], + "properties": { + "messageId": { + "type": "integer", + "format": "int64" + }, + "timestamp": { + "type": "integer", + "format": "int64" + }, + "token": { + "type": "string" + }, + "userId": { + "type": "string" + } + } + }, + "FederationInvite": { + "type": "object", + "required": [ + "access_token", + "id", + "local_room_id", + "remote_attendee_id", + "remote_server_url", + "remote_token", + "user_id" + ], + "properties": { + "access_token": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "local_room_id": { + "type": "integer", + "format": "int64" + }, + "remote_attendee_id": { + "type": "string" + }, + "remote_server_url": { + "type": "string" + }, + "remote_token": { + "type": "string" + }, + "user_id": { + "type": "string" + } + } + }, + "Matterbridge": { + "type": "object", + "required": [ + "enabled", + "parts", + "pid" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "parts": { + "$ref": "#/components/schemas/MatterbridgeConfigFields" + }, + "pid": { + "type": "integer", + "format": "int64" + } + } + }, + "MatterbridgeConfigFields": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "MatterbridgeProcessState": { + "type": "object", + "required": [ + "log", + "running" + ], + "properties": { + "log": { + "type": "string" + }, + "running": { + "type": "boolean" + } + } + }, + "MatterbridgeWithProcessState": { + "allOf": [ + { + "$ref": "#/components/schemas/Matterbridge" + }, + { + "$ref": "#/components/schemas/MatterbridgeProcessState" + } + ] + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "Participant": { + "type": "object", + "required": [ + "actorId", + "actorType", + "attendeeId", + "attendeePermissions", + "attendeePin", + "displayName", + "inCall", + "lastPing", + "participantType", + "permissions", + "roomToken", + "sessionIds" + ], + "properties": { + "actorId": { + "type": "string" + }, + "actorType": { + "type": "string" + }, + "attendeeId": { + "type": "integer", + "format": "int64" + }, + "attendeePermissions": { + "type": "integer", + "format": "int64" + }, + "attendeePin": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "inCall": { + "type": "integer", + "format": "int64" + }, + "lastPing": { + "type": "integer", + "format": "int64" + }, + "participantType": { + "type": "integer", + "format": "int64" + }, + "permissions": { + "type": "integer", + "format": "int64" + }, + "roomToken": { + "type": "string" + }, + "sessionIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "status": { + "type": "string" + }, + "statusClearAt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "statusIcon": { + "type": "string", + "nullable": true + }, + "statusMessage": { + "type": "string", + "nullable": true + }, + "phoneNumber": { + "type": "string", + "nullable": true + }, + "callId": { + "type": "string", + "nullable": true + } + } + }, + "Poll": { + "type": "object", + "required": [ + "actorDisplayName", + "actorId", + "actorType", + "id", + "maxVotes", + "options", + "question", + "resultMode", + "status" + ], + "properties": { + "actorDisplayName": { + "type": "string" + }, + "actorId": { + "type": "string" + }, + "actorType": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PollVote" + } + }, + "id": { + "type": "integer", + "format": "int64" + }, + "maxVotes": { + "type": "integer", + "format": "int64" + }, + "numVoters": { + "type": "integer", + "format": "int64" + }, + "options": { + "type": "array", + "items": { + "type": "string" + } + }, + "question": { + "type": "string" + }, + "resultMode": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "integer", + "format": "int64" + }, + "votedSelf": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "votes": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + } + } + }, + "PollVote": { + "type": "object", + "required": [ + "actorDisplayName", + "actorId", + "actorType", + "optionId" + ], + "properties": { + "actorDisplayName": { + "type": "string" + }, + "actorId": { + "type": "string" + }, + "actorType": { + "type": "string" + }, + "optionId": { + "type": "integer", + "format": "int64" + } + } + }, + "PublicCapabilities": { + "oneOf": [ + { + "type": "object", + "required": [ + "spreed" + ], + "properties": { + "spreed": { + "type": "object", + "required": [ + "features", + "config", + "version" + ], + "properties": { + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "required": [ + "attachments", + "call", + "chat", + "conversations", + "previews", + "signaling" + ], + "properties": { + "attachments": { + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "type": "boolean" + }, + "folder": { + "type": "string" + } + } + }, + "call": { + "type": "object", + "required": [ + "enabled", + "breakout-rooms", + "recording", + "recording-consent", + "supported-reactions", + "predefined-backgrounds", + "can-upload-background", + "sip-enabled", + "sip-dialout-enabled", + "can-enable-sip" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "breakout-rooms": { + "type": "boolean" + }, + "recording": { + "type": "boolean" + }, + "recording-consent": { + "type": "integer", + "format": "int64" + }, + "supported-reactions": { + "type": "array", + "items": { + "type": "string" + } + }, + "predefined-backgrounds": { + "type": "array", + "items": { + "type": "string" + } + }, + "can-upload-background": { + "type": "boolean" + }, + "sip-enabled": { + "type": "boolean" + }, + "sip-dialout-enabled": { + "type": "boolean" + }, + "can-enable-sip": { + "type": "boolean" + } + } + }, + "chat": { + "type": "object", + "required": [ + "max-length", + "read-privacy", + "has-translation-providers", + "typing-privacy" + ], + "properties": { + "max-length": { + "type": "integer", + "format": "int64" + }, + "read-privacy": { + "type": "integer", + "format": "int64" + }, + "has-translation-providers": { + "type": "boolean" + }, + "typing-privacy": { + "type": "integer", + "format": "int64" + } + } + }, + "conversations": { + "type": "object", + "required": [ + "can-create" + ], + "properties": { + "can-create": { + "type": "boolean" + } + } + }, + "previews": { + "type": "object", + "required": [ + "max-gif-size" + ], + "properties": { + "max-gif-size": { + "type": "integer", + "format": "int64" + } + } + }, + "signaling": { + "type": "object", + "required": [ + "session-ping-limit" + ], + "properties": { + "session-ping-limit": { + "type": "integer", + "format": "int64" + }, + "hello-v2-token-key": { + "type": "string" + } + } + } + } + }, + "version": { + "type": "string" + } + } + } + } + }, + { + "type": "array", + "maxLength": 0 + } + ] + }, + "Reaction": { + "type": "object", + "required": [ + "actorDisplayName", + "actorId", + "actorType", + "timestamp" + ], + "properties": { + "actorDisplayName": { + "type": "string" + }, + "actorId": { + "type": "string" + }, + "actorType": { + "type": "string" + }, + "timestamp": { + "type": "integer", + "format": "int64" + } + } + }, + "Room": { + "type": "object", + "required": [ + "actorId", + "actorType", + "attendeeId", + "attendeePermissions", + "attendeePin", + "avatarVersion", + "breakoutRoomMode", + "breakoutRoomStatus", + "callFlag", + "callPermissions", + "callRecording", + "callStartTime", + "canDeleteConversation", + "canEnableSIP", + "canLeaveConversation", + "canStartCall", + "defaultPermissions", + "description", + "displayName", + "hasCall", + "hasPassword", + "id", + "isCustomAvatar", + "isFavorite", + "lastActivity", + "lastCommonReadMessage", + "lastMessage", + "lastPing", + "lastReadMessage", + "listable", + "lobbyState", + "lobbyTimer", + "messageExpiration", + "name", + "notificationCalls", + "notificationLevel", + "objectId", + "objectType", + "participantFlags", + "participantType", + "permissions", + "readOnly", + "recordingConsent", + "sessionId", + "sipEnabled", + "token", + "type", + "unreadMention", + "unreadMentionDirect", + "unreadMessages" + ], + "properties": { + "actorId": { + "type": "string" + }, + "actorType": { + "type": "string" + }, + "attendeeId": { + "type": "integer", + "format": "int64" + }, + "attendeePermissions": { + "type": "integer", + "format": "int64" + }, + "attendeePin": { + "type": "string", + "nullable": true + }, + "avatarVersion": { + "type": "string" + }, + "breakoutRoomMode": { + "type": "integer", + "format": "int64" + }, + "breakoutRoomStatus": { + "type": "integer", + "format": "int64" + }, + "callFlag": { + "type": "integer", + "format": "int64" + }, + "callPermissions": { + "type": "integer", + "format": "int64" + }, + "callRecording": { + "type": "integer", + "format": "int64" + }, + "callStartTime": { + "type": "integer", + "format": "int64" + }, + "canDeleteConversation": { + "type": "boolean" + }, + "canEnableSIP": { + "type": "boolean" + }, + "canLeaveConversation": { + "type": "boolean" + }, + "canStartCall": { + "type": "boolean" + }, + "defaultPermissions": { + "type": "integer", + "format": "int64" + }, + "description": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "hasCall": { + "type": "boolean" + }, + "hasPassword": { + "type": "boolean" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "isCustomAvatar": { + "type": "boolean" + }, + "isFavorite": { + "type": "boolean" + }, + "lastActivity": { + "type": "integer", + "format": "int64" + }, + "lastCommonReadMessage": { + "type": "integer", + "format": "int64" + }, + "lastMessage": { + "oneOf": [ + { + "$ref": "#/components/schemas/ChatMessage" + }, + { + "type": "array", + "maxLength": 0 + } + ] + }, + "lastPing": { + "type": "integer", + "format": "int64" + }, + "lastReadMessage": { + "type": "integer", + "format": "int64" + }, + "listable": { + "type": "integer", + "format": "int64" + }, + "lobbyState": { + "type": "integer", + "format": "int64" + }, + "lobbyTimer": { + "type": "integer", + "format": "int64" + }, + "messageExpiration": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "notificationCalls": { + "type": "integer", + "format": "int64" + }, + "notificationLevel": { + "type": "integer", + "format": "int64" + }, + "objectId": { + "type": "string" + }, + "objectType": { + "type": "string" + }, + "participantFlags": { + "type": "integer", + "format": "int64" + }, + "participantType": { + "type": "integer", + "format": "int64" + }, + "permissions": { + "type": "integer", + "format": "int64" + }, + "readOnly": { + "type": "integer", + "format": "int64" + }, + "recordingConsent": { + "type": "integer", + "format": "int64" + }, + "sessionId": { + "type": "string" + }, + "sipEnabled": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string" + }, + "statusClearAt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "statusIcon": { + "type": "string", + "nullable": true + }, + "statusMessage": { + "type": "string", + "nullable": true + }, + "token": { + "type": "string" + }, + "type": { + "type": "integer", + "format": "int64" + }, + "unreadMention": { + "type": "boolean" + }, + "unreadMentionDirect": { + "type": "boolean" + }, + "unreadMessages": { + "type": "integer", + "format": "int64" + } + } + }, + "SignalingSession": { + "type": "object", + "required": [ + "inCall", + "lastPing", + "participantPermissions", + "roomId", + "sessionId", + "userId" + ], + "properties": { + "inCall": { + "type": "integer", + "format": "int64" + }, + "lastPing": { + "type": "integer", + "format": "int64" + }, + "participantPermissions": { + "type": "integer", + "format": "int64" + }, + "roomId": { + "type": "integer", + "format": "int64" + }, + "sessionId": { + "type": "string" + }, + "userId": { + "type": "string" + } + } + }, + "SignalingSettings": { + "type": "object", + "required": [ + "helloAuthParams", + "hideWarning", + "server", + "signalingMode", + "sipDialinInfo", + "stunservers", + "ticket", + "turnservers", + "userId" + ], + "properties": { + "helloAuthParams": { + "type": "object", + "required": [ + "1.0", + "2.0" + ], + "properties": { + "1.0": { + "type": "object", + "required": [ + "userid", + "ticket" + ], + "properties": { + "userid": { + "type": "string", + "nullable": true + }, + "ticket": { + "type": "string" + } + } + }, + "2.0": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string" + } + } + } + } + }, + "hideWarning": { + "type": "boolean" + }, + "server": { + "type": "string" + }, + "signalingMode": { + "type": "string" + }, + "sipDialinInfo": { + "type": "string" + }, + "stunservers": { + "type": "array", + "items": { + "type": "object", + "required": [ + "urls" + ], + "properties": { + "urls": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "ticket": { + "type": "string" + }, + "turnservers": { + "type": "array", + "items": { + "type": "object", + "required": [ + "urls", + "username", + "credential" + ], + "properties": { + "urls": { + "type": "array", + "items": { + "type": "string" + } + }, + "username": { + "type": "string" + }, + "credential": { + "type": "object" + } + } + } + }, + "userId": { + "type": "string", + "nullable": true + } + } + } + } + }, + "paths": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/avatar": { + "post": { + "operationId": "avatar-upload-avatar", + "summary": "Upload an avatar for a room", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Avatar uploaded successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Avatar invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "avatar-get-avatar", + "summary": "Get the avatar of a room", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "darkTheme", + "in": "query", + "description": "Theme used for background", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Room avatar returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "delete": { + "operationId": "avatar-delete-avatar", + "summary": "Delete the avatar of a room", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Avatar removed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/avatar/emoji": { + "post": { + "operationId": "avatar-emoji-avatar", + "summary": "Set an emoji as avatar", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "emoji", + "in": "query", + "description": "Emoji", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "color", + "in": "query", + "description": "Color of the emoji", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Avatar set successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Setting emoji avatar is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/avatar/dark": { + "get": { + "operationId": "avatar-get-avatar-dark", + "summary": "Get the dark mode avatar of a room", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Room avatar returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}": { + "get": { + "operationId": "bot-list-bots", + "summary": "List bots", + "tags": [ + "bot" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Bot list returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Bot" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/{botId}": { + "post": { + "operationId": "bot-enable-bot", + "summary": "Enables a bot", + "tags": [ + "bot" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "botId", + "in": "path", + "description": "ID of the bot", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Bot already enabled", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Bot", + "nullable": true + } + } + } + } + } + } + } + }, + "201": { + "description": "Bot enabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Bot", + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Enabling bot errored", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "bot-disable-bot", + "summary": "Disables a bot", + "tags": [ + "bot" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "botId", + "in": "path", + "description": "ID of the bot", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Bot disabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Bot", + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Disabling bot errored", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}": { + "post": { + "operationId": "breakout_room-configure-breakout-rooms", + "summary": "Configure the breakout rooms", + "tags": [ + "breakout_room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "mode", + "in": "query", + "description": "Mode of the breakout rooms", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2, + 3 + ] + } + }, + { + "name": "amount", + "in": "query", + "description": "Number of breakout rooms - Constants {@see BreakoutRoom::MINIMUM_ROOM_AMOUNT} and {@see BreakoutRoom::MAXIMUM_ROOM_AMOUNT}", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 20 + } + }, + { + "name": "attendeeMap", + "in": "query", + "description": "Mapping of the attendees to breakout rooms", + "schema": { + "type": "string", + "default": "[]" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Breakout rooms configured successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Configuring breakout rooms errored", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "breakout_room-remove-breakout-rooms", + "summary": "Remove the breakout rooms", + "tags": [ + "breakout_room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Breakout rooms removed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/broadcast": { + "post": { + "operationId": "breakout_room-broadcast-chat-message", + "summary": "Broadcast a chat message to all breakout rooms", + "tags": [ + "breakout_room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "message", + "in": "query", + "description": "Message to broadcast", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Chat message broadcasted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Broadcasting chat message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "413": { + "description": "Chat message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/attendees": { + "post": { + "operationId": "breakout_room-apply-attendee-map", + "summary": "Apply an attendee map to the breakout rooms", + "tags": [ + "breakout_room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "attendeeMap", + "in": "query", + "description": "JSON encoded mapping of the attendees to breakout rooms `array`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Attendee map applied successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Applying attendee map is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/request-assistance": { + "post": { + "operationId": "breakout_room-request-assistance", + "summary": "Request assistance", + "tags": [ + "breakout_room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Assistance requested successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Requesting assistance is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "breakout_room-reset-request-for-assistance", + "summary": "Reset the request for assistance", + "tags": [ + "breakout_room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Request for assistance reset successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Resetting the request for assistance is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/rooms": { + "post": { + "operationId": "breakout_room-start-breakout-rooms", + "summary": "Start the breakout rooms", + "tags": [ + "breakout_room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Breakout rooms started successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Starting breakout rooms is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "breakout_room-stop-breakout-rooms", + "summary": "Stop the breakout rooms", + "tags": [ + "breakout_room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Breakout rooms stopped successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Stopping breakout rooms is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/switch": { + "post": { + "operationId": "breakout_room-switch-breakout-room", + "summary": "Switch to another breakout room", + "tags": [ + "breakout_room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "target", + "in": "query", + "description": "Target breakout room", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Switched to breakout room successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Switching to breakout room is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}": { + "get": { + "operationId": "call-get-peers-for-call", + "summary": "Get the peers for a call", + "tags": [ + "call" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "List of peers in the call returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallPeer" + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "call-join-call", + "summary": "Join a call", + "tags": [ + "call" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "flags", + "in": "query", + "description": "In-Call flags", + "schema": { + "type": "integer", + "nullable": true, + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ] + } + }, + { + "name": "forcePermissions", + "in": "query", + "description": "In-call permissions", + "schema": { + "type": "integer", + "nullable": true, + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255 + ] + } + }, + { + "name": "silent", + "in": "query", + "description": "Join the call silently", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "recordingConsent", + "in": "query", + "description": "When the user ticked a checkbox and agreed with being recorded (Only needed when the `config => call => recording-consent` capability is set to {@see RecordingService::CONSENT_REQUIRED_YES} or the capability is {@see RecordingService::CONSENT_REQUIRED_OPTIONAL} and the conversation `recordingConsent` value is {@see RecordingService::CONSENT_REQUIRED_YES} )", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Call joined successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Call not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "No recording consent was given", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "call-update-call-flags", + "summary": "Update the in-call flags", + "tags": [ + "call" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "flags", + "in": "query", + "description": "New flags", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "In-call flags updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating in-call flags is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Call session not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "call-leave-call", + "summary": "Leave a call", + "tags": [ + "call" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "all", + "in": "query", + "description": "whether to also terminate the call for all participants", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Call left successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Call session not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/ring/{attendeeId}": { + "post": { + "operationId": "call-ring-attendee", + "summary": "Ring an attendee", + "tags": [ + "call" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "attendeeId", + "in": "path", + "description": "ID of the attendee to ring", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Attendee rang successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Ringing attendee is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Attendee could not be found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/dialout/{attendeeId}": { + "post": { + "operationId": "call-sip-dial-out", + "summary": "Call a SIP dial-out attendee", + "tags": [ + "call" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "attendeeId", + "in": "path", + "description": "ID of the attendee to call", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Dial-out initiated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "SIP dial-out not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Participant could not be found or is a wrong type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "501": { + "description": "SIP dial-out is not configured on the server", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}": { + "get": { + "operationId": "chat-receive-messages", + "summary": "Receives chat messages from the given room", + "description": "- Receiving the history ($lookIntoFuture=0): The next $limit messages after $lastKnownMessageId will be returned. The new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\n- Looking into the future ($lookIntoFuture=1): If there are currently no messages the response will not be sent immediately. Instead, HTTP connection will be kept open waiting for new messages to arrive and, when they do, then the response will be sent. The connection will not be kept open indefinitely, though; the number of seconds to wait for new messages to arrive can be set using the timeout parameter; the default timeout is 30 seconds, maximum timeout is 60 seconds. If the timeout ends a successful but empty response will be sent. If messages have been returned (status=200) the new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\nThe limit specifies the maximum number of messages that will be returned, although the actual number of returned messages could be lower if some messages are not visible to the participant. Note that if none of the messages are visible to the participant the returned number of messages will be 0, yet the status will still be 200. Also note that `X-Chat-Last-Given` may reference a message not visible and thus not returned, but it should be used nevertheless as the $lastKnownMessageId for the follow-up query.", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "lookIntoFuture", + "in": "query", + "description": "Polling for new messages (1) or getting the history of the chat (0)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of chat messages to receive (100 by default, 200 at most)", + "schema": { + "type": "integer", + "format": "int64", + "default": 100 + } + }, + { + "name": "lastKnownMessageId", + "in": "query", + "description": "The last known message (serves as offset)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "lastCommonReadId", + "in": "query", + "description": "The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "timeout", + "in": "query", + "description": "Number of seconds to wait for new messages (30 by default, 30 at most)", + "schema": { + "type": "integer", + "format": "int64", + "default": 30, + "minimum": 0, + "maximum": 30 + } + }, + { + "name": "setReadMarker", + "in": "query", + "description": "Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0", + "schema": { + "type": "integer", + "format": "int64", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "includeLastKnown", + "in": "query", + "description": "Include the $lastKnownMessageId in the messages when 1 (default 0)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "noStatusUpdate", + "in": "query", + "description": "When the user status should not be automatically set to online set to 1 (default 0)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "markNotificationsAsRead", + "in": "query", + "description": "Set to 0 when notifications should not be marked as read (default 1)", + "schema": { + "type": "integer", + "format": "int64", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Messages returned", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + }, + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No messages", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + }, + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "chat-send-message", + "summary": "Sends a new chat message to the given room", + "description": "The author and timestamp are automatically set to the current user/guest and time.", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "message", + "in": "query", + "description": "the message to send", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "actorDisplayName", + "in": "query", + "description": "for guests", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "referenceId", + "in": "query", + "description": "for the message to be able to later identify it again", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "replyTo", + "in": "query", + "description": "Parent id which this message is a reply to", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "silent", + "in": "query", + "description": "If sent silent the chat message will not create any notifications", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Message sent successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessageWithParent", + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Sending message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Actor not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "429": { + "description": "Mention rate limit exceeded (guests only)", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "chat-clear-history", + "summary": "Clear the chat history", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "History cleared successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessage" + } + } + } + } + } + } + } + }, + "202": { + "description": "History cleared successfully, but Matterbridge is configured, so the information can be replicated elsewhere", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessage" + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to clear history", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}": { + "delete": { + "operationId": "chat-delete-message", + "summary": "Delete a chat message", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Message deleted successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "202": { + "description": "Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "400": { + "description": "Deleting message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to delete message", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "405": { + "description": "Deleting this message type is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "chat-edit-message", + "summary": "Edit a chat message", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "message", + "in": "query", + "description": "the message to send", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Message edited successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "202": { + "description": "Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "400": { + "description": "Editing message is not possible, e.g. when the new message is empty or the message is too old", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to edit message", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "405": { + "description": "Editing this message type is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/context": { + "get": { + "operationId": "chat-get-message-context", + "summary": "Get the context of a message", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages)", + "schema": { + "type": "integer", + "format": "int64", + "default": 50, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "The focused message which should be in the \"middle\" of the returned context", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Message context returned", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + }, + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No messages", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + }, + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/reminder": { + "post": { + "operationId": "chat-set-reminder", + "summary": "Set a reminder for a chat message", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "timestamp", + "in": "query", + "description": "Timestamp of the reminder", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Reminder created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatReminder" + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "chat-get-reminder", + "summary": "Get the reminder for a chat message", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Reminder returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatReminder" + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "chat-delete-reminder", + "summary": "Delete a chat reminder", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Reminder deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/read": { + "post": { + "operationId": "chat-set-read-marker", + "summary": "Set the read marker to a specific message", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "lastReadMessage", + "in": "query", + "description": "ID if the last read message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Read marker set successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "chat-mark-unread", + "summary": "Mark a chat as unread", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Read marker set successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/mentions": { + "get": { + "operationId": "chat-mentions", + "summary": "Search for mentions", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of results", + "schema": { + "type": "integer", + "format": "int64", + "default": 20 + } + }, + { + "name": "includeStatus", + "in": "query", + "description": "Include the user statuses", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "List of mention suggestions returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMentionSuggestion" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share": { + "post": { + "operationId": "chat-share-object-to-chat", + "summary": "Sends a rich-object to the given room", + "description": "The author and timestamp are automatically set to the current user/guest and time.", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "objectType", + "in": "query", + "description": "Type of the object", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "objectId", + "in": "query", + "description": "ID of the object", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "metaData", + "in": "query", + "description": "Additional metadata", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "actorDisplayName", + "in": "query", + "description": "Guest name", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "referenceId", + "in": "query", + "description": "Reference ID", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Object shared successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessageWithParent", + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Sharing object is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Actor not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "chat-get-objects-shared-in-room", + "summary": "Get objects that are shared in the room", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "objectType", + "in": "query", + "description": "Type of the objects", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lastKnownMessageId", + "in": "query", + "description": "ID of the last known message", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of objects", + "schema": { + "type": "integer", + "format": "int64", + "default": 100, + "minimum": 1, + "maximum": 200 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "List of shared objects messages returned", + "headers": { + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessage" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share/overview": { + "get": { + "operationId": "chat-get-objects-shared-in-room-overview", + "summary": "Get objects that are shared in the room overview", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of objects", + "schema": { + "type": "integer", + "format": "int64", + "default": 7, + "minimum": 1, + "maximum": 20 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "List of shared objects messages of each type returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessage" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/file/{fileId}": { + "get": { + "operationId": "files_integration-get-room-by-file-id", + "summary": "Get the token of the room associated to the given file id", + "description": "This is the counterpart of self::getRoomByShareToken() for file ids instead of share tokens, although both return the same room token if the given file id and share token refer to the same file.\nIf there is no room associated to the given file id a new room is created; the new room is a public room associated with a \"file\" object with the given file id. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file).\nIn any case, to create or even get the token of the room, the file must be shared and the user must be the owner of a public share of the file (like a link share, for example) or have direct access to that file; an error is returned otherwise. A user has direct access to a file if she has access to it (or to an ancestor) through a user, group, circle or room share (but not through a link share, for example), or if she is the owner of such a file.", + "tags": [ + "files_integration" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "fileId", + "in": "path", + "description": "ID of the file", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Room token returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Rooms not allowed for shares", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshare/{shareToken}": { + "get": { + "operationId": "files_integration-get-room-by-share-token", + "summary": "Returns the token of the room associated to the file of the given share token", + "description": "This is the counterpart of self::getRoomByFileId() for share tokens instead of file ids, although both return the same room token if the given file id and share token refer to the same file.\nIf there is no room associated to the file id of the given share token a new room is created; the new room is a public room associated with a \"file\" object with the file id of the given share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file).\nIn any case, to create or even get the token of the room, the file must be publicly shared (like a link share, for example); an error is returned otherwise.\nBesides the token of the room this also returns the current user ID and display name, if any; this is needed by the Talk sidebar to know the actual current user, as the public share page uses the incognito mode and thus logged-in users as seen as guests.", + "tags": [ + "files_integration" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "shareToken", + "in": "path", + "description": "Token of the file share", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Room token and user info returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "token", + "userId", + "userDisplayName" + ], + "properties": { + "token": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "userDisplayName": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Rooms not allowed for shares", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/guest/{token}/name": { + "post": { + "operationId": "guest-set-display-name", + "summary": "Set the display name as a guest", + "tags": [ + "guest" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "displayName", + "in": "query", + "description": "New display name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Display name updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Not a guest", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Not a participant", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}": { + "get": { + "operationId": "matterbridge-get-bridge-of-room", + "summary": "Get bridge information of one room", + "tags": [ + "matterbridge" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Return list of configured bridges", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/MatterbridgeWithProcessState" + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "matterbridge-edit-bridge-of-room", + "summary": "Edit bridge information of one room", + "tags": [ + "matterbridge" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "enabled", + "in": "query", + "description": "If the bridge should be enabled", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "parts", + "in": "query", + "description": "New parts", + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Bridge edited successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/MatterbridgeProcessState" + } + } + } + } + } + } + } + }, + "406": { + "description": "Editing bridge is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "matterbridge-delete-bridge-of-room", + "summary": "Delete bridge of one room", + "tags": [ + "matterbridge" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Bridge deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "406": { + "description": "Deleting bridge is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}/process": { + "get": { + "operationId": "matterbridge-get-bridge-process-state", + "summary": "Get bridge process information", + "tags": [ + "matterbridge" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Return list of running processes", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/MatterbridgeProcessState" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}": { + "post": { + "operationId": "poll-create-poll", + "summary": "Create a poll", + "tags": [ + "poll" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "question", + "in": "query", + "description": "Question of the poll", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "options[]", + "in": "query", + "description": "Options of the poll", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "resultMode", + "in": "query", + "description": "Mode how the results will be shown", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "maxVotes", + "in": "query", + "description": "Number of maximum votes per voter", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Poll created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Poll" + } + } + } + } + } + } + } + }, + "400": { + "description": "Creating poll is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/{pollId}": { + "get": { + "operationId": "poll-show-poll", + "summary": "Get a poll", + "tags": [ + "poll" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "pollId", + "in": "path", + "description": "ID of the poll", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Poll returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Poll" + } + } + } + } + } + } + } + }, + "404": { + "description": "Poll not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "poll-vote-poll", + "summary": "Vote on a poll", + "tags": [ + "poll" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "optionIds[]", + "in": "query", + "description": "IDs of the selected options", + "schema": { + "type": "array", + "default": [], + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "pollId", + "in": "path", + "description": "ID of the poll", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Voted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Poll" + } + } + } + } + } + } + } + }, + "400": { + "description": "Voting is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Poll not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "poll-close-poll", + "summary": "Close a poll", + "tags": [ + "poll" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "pollId", + "in": "path", + "description": "ID of the poll", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Poll closed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Poll" + } + } + } + } + } + } + } + }, + "400": { + "description": "Poll already closed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to close poll", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Poll not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshareauth": { + "post": { + "operationId": "files_integration-create-room", + "summary": "Creates a new room for video verification (requesting the password of a share)", + "description": "The new room is a public room associated with a \"share:password\" object with the ID of the share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms always created by a guest or user on behalf of a registered user, the sharer, who will be the owner of the room.\nThe share must have \"send password by Talk\" enabled; an error is returned otherwise.", + "tags": [ + "files_integration" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "shareToken", + "in": "query", + "description": "Token of the file share", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Room created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "token", + "name", + "displayName" + ], + "properties": { + "token": { + "type": "string" + }, + "name": { + "type": "string" + }, + "displayName": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/reaction/{token}/{messageId}": { + "post": { + "operationId": "reaction-react", + "summary": "Add a reaction to a message", + "tags": [ + "reaction" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "reaction", + "in": "query", + "description": "Emoji to add", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Reaction already existed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reaction" + } + } + } + } + } + } + } + } + } + }, + "201": { + "description": "Reaction added successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reaction" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Adding reaction is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "reaction-delete", + "summary": "Delete a reaction from a message", + "tags": [ + "reaction" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "reaction", + "in": "query", + "description": "Emoji to remove", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Reaction deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reaction" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Deleting reaction is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "reaction-get-reactions", + "summary": "Get a list of reactions for a message", + "tags": [ + "reaction" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "reaction", + "in": "query", + "description": "Emoji to filter", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Reactions returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reaction" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message or reaction not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}": { + "post": { + "operationId": "recording-start", + "summary": "Start the recording", + "tags": [ + "recording" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "status", + "in": "query", + "description": "Type of the recording", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Recording started successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Starting recording is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "recording-stop", + "summary": "Stop the recording", + "tags": [ + "recording" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Recording stopped successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Stopping recording is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/notification": { + "delete": { + "operationId": "recording-notification-dismiss", + "summary": "Dismiss the store call recording notification", + "tags": [ + "recording" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "timestamp", + "in": "query", + "description": "Timestamp of the notification to be dismissed", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Notification dismissed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Dismissing notification is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/share-chat": { + "post": { + "operationId": "recording-share-to-chat", + "summary": "Share the recorded file to the chat", + "tags": [ + "recording" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "fileId", + "in": "query", + "description": "ID of the file", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "timestamp", + "in": "query", + "description": "Timestamp of the notification to be dismissed", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Recording shared to chat successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Sharing recording to chat is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room": { + "get": { + "operationId": "room-get-rooms", + "summary": "Get all currently existent rooms which the user has joined", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "noStatusUpdate", + "in": "query", + "description": "When the user status should not be automatically set to online set to 1 (default 0)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "includeStatus", + "in": "query", + "description": "Include the user status", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "modifiedSince", + "in": "query", + "description": "Filter rooms modified after a timestamp", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Return list of rooms", + "headers": { + "X-Nextcloud-Talk-Hash": { + "schema": { + "type": "string" + } + }, + "X-Nextcloud-Talk-Modified-Before": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "room-create-room", + "summary": "Create a room with a user, a group or a circle", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "roomType", + "in": "query", + "description": "Type of the room", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "invite", + "in": "query", + "description": "User, group, … ID to invite", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "roomName", + "in": "query", + "description": "Name of the room", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "source", + "in": "query", + "description": "Source of the invite ID ('circles' to create a room with a circle, etc.)", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "objectType", + "in": "query", + "description": "Type of the object", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "objectId", + "in": "query", + "description": "ID of the object", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Room already existed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "201": { + "description": "Room created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Room type invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to create room", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "User, group or other target to invite was not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/listed-room": { + "get": { + "operationId": "room-get-listed-rooms", + "summary": "Get listed rooms with optional search term", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "searchTerm", + "in": "query", + "description": "search term", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Return list of matching rooms", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/note-to-self": { + "get": { + "operationId": "room-get-note-to-self-conversation", + "summary": "Get the \"Note to self\" conversation for the user", + "description": "It will be automatically created when it is currently missing", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Room returned successfully", + "headers": { + "X-Nextcloud-Talk-Hash": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}": { + "get": { + "operationId": "room-get-single-room", + "summary": "Get a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "description": "Token of the room", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Room returned", + "headers": { + "X-Nextcloud-Talk-Hash": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Room not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms": { + "get": { + "operationId": "room-get-breakout-rooms", + "summary": "Get breakout rooms", + "description": "All for moderators and in case of \"free selection\", or the assigned breakout room for other participants", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Breakout rooms returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Getting breakout rooms is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/public": { + "post": { + "operationId": "room-make-public", + "summary": "Allowed guests to join conversation", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Allowed guests successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Allowing guests is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-make-private", + "summary": "Disallowed guests to join conversation", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Room unpublished Disallowing guests successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Disallowing guests is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/description": { + "put": { + "operationId": "room-set-description", + "summary": "Update the description of a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "description", + "in": "query", + "description": "New description", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Description updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating description is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/read-only": { + "put": { + "operationId": "room-set-read-only", + "summary": "Set read-only state of a room", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "state", + "in": "query", + "description": "New read-only state", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Read-only state updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating read-only state is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/listable": { + "put": { + "operationId": "room-set-listable", + "summary": "Make a room listable", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "scope", + "in": "query", + "description": "Scope where the room is listable", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Made room listable successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Making room listable is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/password": { + "put": { + "operationId": "room-set-password", + "summary": "Set a password for a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "password", + "in": "query", + "description": "New password", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Password set successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Setting password is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Setting password is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/permissions/{mode}": { + "put": { + "operationId": "room-set-permissions", + "summary": "Update the permissions of a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "permissions", + "in": "query", + "description": "New permissions", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "mode", + "in": "path", + "description": "Level of the permissions ('call', 'default')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "call", + "default" + ], + "pattern": "^(call|default)$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Permissions updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Updating permissions is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants": { + "get": { + "operationId": "room-get-participants", + "summary": "Get a list of participants for a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "includeStatus", + "in": "query", + "description": "Include the user statuses", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participants returned", + "headers": { + "X-Nextcloud-Has-User-Statuses": { + "schema": { + "type": "boolean" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Participant" + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions for getting participants", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "room-add-participant-to-room", + "summary": "Add a participant to a room", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "newParticipant", + "in": "query", + "description": "New participant", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "source", + "in": "query", + "description": "Source of the participant", + "schema": { + "type": "string", + "default": "users", + "enum": [ + "users", + "groups", + "circles", + "emails", + "remotes", + "phones" + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participant successfully added", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "integer", + "format": "int64" + } + } + }, + { + "type": "array", + "maxLength": 0 + } + ] + } + } + } + } + } + } + } + }, + "404": { + "description": "User, group or other target to invite was not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "501": { + "description": "SIP dial-out is not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Adding participant is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms/participants": { + "get": { + "operationId": "room-get-breakout-room-participants", + "summary": "Get the breakout room participants for a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "includeStatus", + "in": "query", + "description": "Include the user statuses", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Breakout room participants returned", + "headers": { + "X-Nextcloud-Has-User-Statuses": { + "schema": { + "type": "boolean" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Participant" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Getting breakout room participants is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to get breakout room participants", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/self": { + "delete": { + "operationId": "room-remove-self-from-room", + "summary": "Remove the current user from a room", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participant removed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Removing participant is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Participant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees": { + "delete": { + "operationId": "room-remove-attendee-from-room", + "summary": "Remove an attendee from a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "attendeeId", + "in": "query", + "description": "ID of the attendee", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Attendee removed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Removing attendee is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Removing attendee is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Attendee not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions": { + "put": { + "operationId": "room-set-attendee-permissions", + "summary": "Update the permissions of an attendee", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "attendeeId", + "in": "query", + "description": "ID of the attendee", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "method", + "in": "query", + "description": "Method of updating permissions ('set', 'remove', 'add')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "set", + "remove", + "add" + ] + } + }, + { + "name": "permissions", + "in": "query", + "description": "New permissions", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Permissions updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating permissions is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to update permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Attendee not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions/all": { + "put": { + "operationId": "room-set-all-attendees-permissions", + "summary": "Update the permissions of all attendees", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "method", + "in": "query", + "description": "Method of updating permissions ('set', 'remove', 'add')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "set", + "remove", + "add" + ] + } + }, + { + "name": "permissions", + "in": "query", + "description": "New permissions", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Permissions updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Updating permissions is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/active": { + "post": { + "operationId": "room-join-room", + "summary": "Join a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "password", + "in": "query", + "description": "Password of the room", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "force", + "in": "query", + "description": "Create a new session if necessary", + "schema": { + "type": "integer", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "description": "Token of the room", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Room joined successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "403": { + "description": "Joining room is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Room not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "409": { + "description": "Session already exists", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "sessionId", + "inCall", + "lastPing" + ], + "properties": { + "sessionId": { + "type": "string" + }, + "inCall": { + "type": "integer", + "format": "int64" + }, + "lastPing": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-leave-room", + "summary": "Leave a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "description": "Token of the room", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Successfully left the room", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/resend-invitations": { + "post": { + "operationId": "room-resend-invitations", + "summary": "Resend invitations", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "attendeeId", + "in": "query", + "description": "ID of the attendee", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Invitation resent successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Attendee not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/state": { + "put": { + "operationId": "room-set-session-state", + "summary": "Set active state for a session", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "state", + "in": "query", + "description": "of the room", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Session state set successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "The provided new state was invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "The participant did not have a session", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/moderators": { + "post": { + "operationId": "room-promote-moderator", + "summary": "Promote an attendee to moderator", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "attendeeId", + "in": "query", + "description": "ID of the attendee", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Attendee promoted to moderator successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Promoting attendee to moderator is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Promoting attendee to moderator is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Attendee not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-demote-moderator", + "summary": "Demote an attendee from moderator", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "attendeeId", + "in": "query", + "description": "ID of the attendee", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Attendee demoted from moderator successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Demoting attendee from moderator is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Demoting attendee from moderator is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Attendee not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/favorite": { + "post": { + "operationId": "room-add-to-favorites", + "summary": "Add a room to the favorites", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Successfully added room to favorites", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-remove-from-favorites", + "summary": "Remove a room from the favorites", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Successfully removed room from favorites", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify": { + "post": { + "operationId": "room-set-notification-level", + "summary": "Update the notification level for a room", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "level", + "in": "query", + "description": "New level", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Notification level updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating notification level is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify-calls": { + "post": { + "operationId": "room-set-notification-calls", + "summary": "Update call notifications", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "level", + "in": "query", + "description": "New level", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Call notification level updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating call notification level is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/webinar/lobby": { + "put": { + "operationId": "room-set-lobby", + "summary": "Update the lobby state for a room", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "state", + "in": "query", + "description": "New state", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "timer", + "in": "query", + "description": "Timer when the lobby will be removed", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Lobby state updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Updating lobby state is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/webinar/sip": { + "put": { + "operationId": "room-setsip-enabled", + "summary": "Update SIP enabled state", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "state", + "in": "query", + "description": "New state", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "SIP enabled state updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Updating SIP enabled state is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to update SIP enabled state", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "412": { + "description": "SIP not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/recording-consent": { + "put": { + "operationId": "room-set-recording-consent", + "summary": "Set recording consent requirement for this conversation", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "recordingConsent", + "in": "query", + "description": "New consent setting for the conversation (Only {@see RecordingService::CONSENT_REQUIRED_NO} and {@see RecordingService::CONSENT_REQUIRED_YES} are allowed here.)", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Recording consent requirement set successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Setting recording consent requirement is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "412": { + "description": "No recording server is configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/message-expiration": { + "post": { + "operationId": "room-set-message-expiration", + "summary": "Update message expiration time", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "seconds", + "in": "query", + "description": "New time", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Message expiration time updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating message expiration time is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/settings/user": { + "post": { + "operationId": "settings-set-user-setting", + "summary": "Update user setting", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "Key to update", + "required": true, + "schema": { + "type": "string", + "enum": [ + "attachment_folder", + "read_status_privacy", + "typing_privacy", + "play_sounds" + ] + } + }, + { + "name": "value", + "in": "query", + "description": "New value for the key", + "schema": { + "nullable": true, + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User setting updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating user setting is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/settings": { + "get": { + "operationId": "internal_signaling-external_signaling-get-settings", + "summary": "Get the signaling settings", + "tags": [ + "internal_signaling", + "external_signaling" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "Token of the room", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v3" + ], + "default": "v3" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Signaling settings returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/SignalingSettings" + } + } + } + } + } + } + } + }, + "401": { + "description": "Recording request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Room not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/{token}": { + "post": { + "operationId": "internal_signaling-send-messages", + "summary": "Send signaling messages", + "tags": [ + "internal_signaling" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "messages", + "in": "query", + "description": "JSON encoded messages", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v3" + ], + "default": "v3" + } + }, + { + "name": "token", + "in": "path", + "description": "Token of the room", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Signaling message sent successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Sending signaling message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "internal_signaling-pull-messages", + "summary": "Get signaling messages", + "tags": [ + "internal_signaling" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v3" + ], + "default": "v3" + } + }, + { + "name": "token", + "in": "path", + "description": "Token of the room", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Signaling messages returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "data" + ], + "properties": { + "type": { + "type": "string" + }, + "data": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignalingSession" + } + }, + { + "type": "string" + } + ] + } + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Session, room or participant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "data" + ], + "properties": { + "type": { + "type": "string" + }, + "data": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignalingSession" + } + }, + { + "type": "string" + } + ] + } + } + } + } + } + } + } + } + } + } + }, + "409": { + "description": "Session killed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "data" + ], + "properties": { + "type": { + "type": "string" + }, + "data": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignalingSession" + } + }, + { + "type": "string" + } + ] + } + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Getting signaling messages is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/temp-user-avatar": { + "post": { + "operationId": "user_avatar-post-avatar", + "summary": "Upload your avatar as a user", + "tags": [ + "user_avatar" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Avatar uploaded successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Uploading avatar is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "user_avatar-delete-avatar", + "summary": "Delete your avatar as a user", + "tags": [ + "user_avatar" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Avatar deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Deleting avatar is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/message": { + "post": { + "operationId": "bot-send-message", + "summary": "Sends a new chat message to the given room", + "description": "The author and timestamp are automatically set to the current user/guest and time.", + "tags": [ + "bot" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "message", + "in": "query", + "description": "The message to send", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "referenceId", + "in": "query", + "description": "For the message to be able to later identify it again", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "replyTo", + "in": "query", + "description": "Parent id which this message is a reply to", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "silent", + "in": "query", + "description": "If sent silent the chat message will not create any notifications", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "description": "Conversation token", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Message sent successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "When the replyTo is invalid or message is empty", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Sending message is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/reaction/{messageId}": { + "post": { + "operationId": "bot-react", + "summary": "Adds a reaction to a chat message", + "tags": [ + "bot" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "reaction", + "in": "query", + "description": "Reaction to add", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "description": "Conversation token", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Reaction already exists", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "201": { + "description": "Reacted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Reacting is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Reacting is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Reaction not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "bot-delete-reaction", + "summary": "Deletes a reaction from a chat message", + "tags": [ + "bot" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "reaction", + "in": "query", + "description": "Reaction to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "description": "Conversation token", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Reaction deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Reacting is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Reaction not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Reacting is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/admin": { + "get": { + "operationId": "settings-admin-list-bots", + "summary": "List admin bots", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Bot list returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BotWithDetails" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/certificate/expiration": { + "get": { + "operationId": "settings-get-certificate-expiration", + "summary": "Get the certificate expiration for a host", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "host", + "in": "query", + "description": "Host to check", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Certificate expiration returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "expiration_in_days" + ], + "properties": { + "expiration_in_days": { + "type": "integer", + "format": "int64", + "nullable": true + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Getting certificate expiration is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/hostedsignalingserver/requesttrial": { + "post": { + "operationId": "hosted_signaling_server-request-trial", + "summary": "Request a trial account", + "description": "This endpoint requires admin access", + "tags": [ + "hosted_signaling_server" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "url", + "in": "query", + "description": "Server URL", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "Display name of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "email", + "in": "query", + "description": "Email of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "language", + "in": "query", + "description": "Language of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "country", + "in": "query", + "description": "Country of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Trial requested successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Requesting trial is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/hostedsignalingserver/delete": { + "delete": { + "operationId": "hosted_signaling_server-delete-account", + "summary": "Delete the account", + "description": "This endpoint requires admin access", + "tags": [ + "hosted_signaling_server" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "204": { + "description": "Account deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Deleting account is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge": { + "delete": { + "operationId": "matterbridge-stop-all-bridges", + "summary": "Stop all bridges", + "description": "This endpoint requires admin access", + "tags": [ + "matterbridge" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "All bridges stopped successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "406": { + "description": "Stopping all bridges is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/version": { + "get": { + "operationId": "matterbridge-get-matterbridge-version", + "summary": "Get Matterbridge version", + "description": "This endpoint requires admin access", + "tags": [ + "matterbridge" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Bridge version returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Getting bridge version is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/welcome/{serverId}": { + "get": { + "operationId": "settings-get-welcome-message", + "summary": "Get the welcome message of a recording server", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "serverId", + "in": "path", + "description": "ID of the server", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Welcome message returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "number", + "format": "float" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Recording server not found or not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/settings/sip": { + "post": { + "operationId": "settings-setsip-settings", + "summary": "Update SIP bridge settings", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "sipGroups[]", + "in": "query", + "description": "New SIP groups", + "schema": { + "type": "array", + "default": [], + "items": { + "type": "string" + } + } + }, + { + "name": "dialInInfo", + "in": "query", + "description": "New dial info", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sharedSecret", + "in": "query", + "description": "New shared secret", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Successfully set new SIP settings", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/welcome/{serverId}": { + "get": { + "operationId": "settings-get-welcome-message", + "summary": "Get the welcome message from a signaling server", + "description": "Only available for logged-in users because guests can not use the apps right now.\nThis endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v3" + ], + "default": "v3" + } + }, + { + "name": "serverId", + "in": "path", + "description": "ID of the signaling server", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Welcome message returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Signaling server not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + }, + "version": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/backend": { + "post": { + "operationId": "recording-backend", + "summary": "Update the recording status as a backend", + "tags": [ + "recording" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Recording status updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating recording status is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "type", + "error" + ], + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to update recording status", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "type", + "error" + ], + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Room not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "type", + "error" + ], + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/store": { + "post": { + "operationId": "recording-store", + "summary": "Store the recording", + "tags": [ + "recording" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "owner", + "in": "query", + "description": "User that will own the recording file", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Recording stored successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Storing recording is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Missing permissions to store recording", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "type", + "error" + ], + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/pin/{pin}": { + "get": { + "operationId": "room-verify-dial-in-pin", + "summary": "Verify a dial-in PIN (SIP bridge)", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "pin", + "in": "path", + "description": "PIN the participant used to dial-in", + "required": true, + "schema": { + "type": "string", + "pattern": "^\\d{7,32}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participant returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Participant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "501": { + "description": "SIP dial-in is not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/verify-dialin": { + "post": { + "operationId": "room-verify-dial-in-pin", + "summary": "Verify a dial-in PIN (SIP bridge)", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "pin", + "in": "query", + "description": "PIN the participant used to dial-in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participant returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Participant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "501": { + "description": "SIP dial-in is not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/verify-dialout": { + "post": { + "operationId": "room-verify-dial-out-number", + "summary": "Verify a dial-out number (SIP bridge)", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "number", + "in": "query", + "description": "E164 formatted phone number", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "options", + "in": "query", + "description": "Additional details to verify the validity of the request", + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participant created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "Phone number and details could not be confirmed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Phone number is not invited as a participant", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "501": { + "description": "SIP dial-out is not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/open-dial-in": { + "post": { + "operationId": "room-create-guest-by-dial-in", + "summary": "Create a guest by their dial-in", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Participant created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + }, + "400": { + "description": "SIP not enabled", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/rejected-dialout": { + "delete": { + "operationId": "room-rejected-dial-out-request", + "summary": "Reset call ID of a dial-out participant when the SIP gateway rejected it", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "callId", + "in": "query", + "description": "The call ID provided by the SIP bridge earlier to uniquely identify the call to terminate", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "options", + "in": "query", + "description": "Additional details to verify the validity of the request", + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Call ID reset", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Call ID mismatch or attendeeId not found in $options", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "SIP request invalid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Participant was not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "501": { + "description": "SIP dial-out is not configured", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/backend": { + "post": { + "operationId": "signaling-backend", + "summary": "Backend API to query information required for standalone signaling servers", + "description": "See sections \"Backend validation\" in https://nextcloud-spreed-signaling.readthedocs.io/en/latest/standalone-signaling-api-v1/#backend-requests", + "tags": [ + "signaling" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v3" + ], + "default": "v3" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Always, sorry about that", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "auth": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "userid": { + "type": "string" + }, + "user": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "room": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "roomid": { + "type": "string" + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "session": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/openapi.json b/openapi.json index 68c6979da0b..13f90ffc08f 100644 --- a/openapi.json +++ b/openapi.json @@ -46,65 +46,6 @@ } } }, - "BotWithDetails": { - "allOf": [ - { - "$ref": "#/components/schemas/Bot" - }, - { - "type": "object", - "required": [ - "error_count", - "features", - "last_error_date", - "last_error_message", - "url", - "url_hash" - ], - "properties": { - "error_count": { - "type": "integer", - "format": "int64" - }, - "features": { - "type": "integer", - "format": "int64" - }, - "last_error_date": { - "type": "integer", - "format": "int64" - }, - "last_error_message": { - "type": "string" - }, - "url": { - "type": "string" - }, - "url_hash": { - "type": "string" - } - } - } - ] - }, - "BotWithDetailsAndSecret": { - "allOf": [ - { - "$ref": "#/components/schemas/BotWithDetails" - }, - { - "type": "object", - "required": [ - "secret" - ], - "properties": { - "secret": { - "type": "string" - } - } - } - ] - }, "CallPeer": { "type": "object", "required": [ @@ -316,43 +257,6 @@ } } }, - "FederationInvite": { - "type": "object", - "required": [ - "access_token", - "id", - "local_room_id", - "remote_attendee_id", - "remote_server_url", - "remote_token", - "user_id" - ], - "properties": { - "access_token": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "local_room_id": { - "type": "integer", - "format": "int64" - }, - "remote_attendee_id": { - "type": "string" - }, - "remote_server_url": { - "type": "string" - }, - "remote_token": { - "type": "string" - }, - "user_id": { - "type": "string" - } - } - }, "Matterbridge": { "type": "object", "required": [ @@ -1712,16 +1616,14 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/message": { - "post": { - "operationId": "bot-send-message", - "summary": "Sends a new chat message to the given room", - "description": "The author and timestamp are automatically set to the current user/guest and time.", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}": { + "get": { + "operationId": "bot-list-bots", + "summary": "List bots", "tags": [ "bot" ], "security": [ - {}, { "bearer_auth": [] }, @@ -1730,47 +1632,6 @@ } ], "parameters": [ - { - "name": "message", - "in": "query", - "description": "The message to send", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "referenceId", - "in": "query", - "description": "For the message to be able to later identify it again", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "replyTo", - "in": "query", - "description": "Parent id which this message is a reply to", - "schema": { - "type": "integer", - "format": "int64", - "default": 0 - } - }, - { - "name": "silent", - "in": "query", - "description": "If sent silent the chat message will not create any notifications", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, { "name": "apiVersion", "in": "path", @@ -1786,7 +1647,6 @@ { "name": "token", "in": "path", - "description": "Conversation token", "required": true, "schema": { "type": "string", @@ -1805,8 +1665,8 @@ } ], "responses": { - "201": { - "description": "Message sent successfully", + "200": { + "description": "Bot list returned", "content": { "application/json": { "schema": { @@ -1825,16 +1685,83 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Bot" + } + } } } } } } } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/{botId}": { + "post": { + "operationId": "bot-enable-bot", + "summary": "Enables a bot", + "tags": [ + "bot" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } }, - "400": { - "description": "When the replyTo is invalid or message is empty", + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "botId", + "in": "path", + "description": "ID of the bot", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Bot already enabled", "content": { "application/json": { "schema": { @@ -1853,7 +1780,10 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "$ref": "#/components/schemas/Bot", + "nullable": true + } } } } @@ -1861,8 +1791,8 @@ } } }, - "401": { - "description": "Sending message is not allowed", + "201": { + "description": "Bot enabled successfully", "content": { "application/json": { "schema": { @@ -1881,7 +1811,10 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "$ref": "#/components/schemas/Bot", + "nullable": true + } } } } @@ -1889,8 +1822,8 @@ } } }, - "413": { - "description": "Message too long", + "400": { + "description": "Enabling bot errored", "content": { "application/json": { "schema": { @@ -1909,7 +1842,17 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } } } } @@ -1918,17 +1861,14 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/reaction/{messageId}": { - "post": { - "operationId": "bot-react", - "summary": "Adds a reaction to a chat message", + }, + "delete": { + "operationId": "bot-disable-bot", + "summary": "Disables a bot", "tags": [ "bot" ], "security": [ - {}, { "bearer_auth": [] }, @@ -1937,15 +1877,6 @@ } ], "parameters": [ - { - "name": "reaction", - "in": "query", - "description": "Reaction to add", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "apiVersion", "in": "path", @@ -1961,7 +1892,6 @@ { "name": "token", "in": "path", - "description": "Conversation token", "required": true, "schema": { "type": "string", @@ -1969,9 +1899,9 @@ } }, { - "name": "messageId", + "name": "botId", "in": "path", - "description": "ID of the message", + "description": "ID of the bot", "required": true, "schema": { "type": "integer", @@ -1991,7 +1921,7 @@ ], "responses": { "200": { - "description": "Reaction already exists", + "description": "Bot disabled successfully", "content": { "application/json": { "schema": { @@ -2010,7 +1940,10 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "$ref": "#/components/schemas/Bot", + "nullable": true + } } } } @@ -2018,8 +1951,8 @@ } } }, - "201": { - "description": "Reacted successfully", + "400": { + "description": "Disabling bot errored", "content": { "application/json": { "schema": { @@ -2038,91 +1971,17 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} - } - } - } - } - } - } - }, - "400": { - "description": "Reacting is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "401": { - "description": "Reacting is not allowed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "404": { - "description": "Reaction not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } } } } @@ -2131,15 +1990,16 @@ } } } - }, - "delete": { - "operationId": "bot-delete-reaction", - "summary": "Deletes a reaction from a chat message", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}": { + "post": { + "operationId": "breakout_room-configure-breakout-rooms", + "summary": "Configure the breakout rooms", "tags": [ - "bot" + "breakout_room" ], "security": [ - {}, { "bearer_auth": [] }, @@ -2149,12 +2009,40 @@ ], "parameters": [ { - "name": "reaction", + "name": "mode", + "in": "query", + "description": "Mode of the breakout rooms", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2, + 3 + ] + } + }, + { + "name": "amount", "in": "query", - "description": "Reaction to delete", + "description": "Number of breakout rooms - Constants {@see BreakoutRoom::MINIMUM_ROOM_AMOUNT} and {@see BreakoutRoom::MAXIMUM_ROOM_AMOUNT}", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 20 + } + }, + { + "name": "attendeeMap", + "in": "query", + "description": "Mapping of the attendees to breakout rooms", + "schema": { + "type": "string", + "default": "[]" } }, { @@ -2172,23 +2060,12 @@ { "name": "token", "in": "path", - "description": "Conversation token", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,30}$" } }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -2202,7 +2079,7 @@ ], "responses": { "200": { - "description": "Reaction deleted successfully", + "description": "Breakout rooms configured successfully", "content": { "application/json": { "schema": { @@ -2221,7 +2098,12 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } } } } @@ -2230,63 +2112,7 @@ } }, "400": { - "description": "Reacting is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "404": { - "description": "Reaction not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "401": { - "description": "Reacting is not allowed", + "description": "Configuring breakout rooms errored", "content": { "application/json": { "schema": { @@ -2305,7 +2131,17 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } } } } @@ -2314,15 +2150,12 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/admin": { - "get": { - "operationId": "bot-admin-list-bots", - "summary": "List admin bots", - "description": "This endpoint requires admin access", + }, + "delete": { + "operationId": "breakout_room-remove-breakout-rooms", + "summary": "Remove the breakout rooms", "tags": [ - "bot" + "breakout_room" ], "security": [ { @@ -2345,6 +2178,15 @@ "default": "v1" } }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -2358,7 +2200,7 @@ ], "responses": { "200": { - "description": "Bot list returned", + "description": "Breakout rooms removed successfully", "content": { "application/json": { "schema": { @@ -2378,10 +2220,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BotWithDetails" - } + "$ref": "#/components/schemas/Room" } } } @@ -2393,12 +2232,12 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}": { - "get": { - "operationId": "bot-list-bots", - "summary": "List bots", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/broadcast": { + "post": { + "operationId": "breakout_room-broadcast-chat-message", + "summary": "Broadcast a chat message to all breakout rooms", "tags": [ - "bot" + "breakout_room" ], "security": [ { @@ -2409,6 +2248,15 @@ } ], "parameters": [ + { + "name": "message", + "in": "query", + "description": "Message to broadcast", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "apiVersion", "in": "path", @@ -2442,8 +2290,8 @@ } ], "responses": { - "200": { - "description": "Bot list returned", + "201": { + "description": "Chat message broadcasted successfully", "content": { "application/json": { "schema": { @@ -2465,7 +2313,83 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Bot" + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Broadcasting chat message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "413": { + "description": "Chat message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } } } } @@ -2478,12 +2402,12 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/{botId}": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/attendees": { "post": { - "operationId": "bot-enable-bot", - "summary": "Enables a bot", + "operationId": "breakout_room-apply-attendee-map", + "summary": "Apply an attendee map to the breakout rooms", "tags": [ - "bot" + "breakout_room" ], "security": [ { @@ -2494,6 +2418,15 @@ } ], "parameters": [ + { + "name": "attendeeMap", + "in": "query", + "description": "JSON encoded mapping of the attendees to breakout rooms `array`", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "apiVersion", "in": "path", @@ -2515,16 +2448,6 @@ "pattern": "^[a-z0-9]{4,30}$" } }, - { - "name": "botId", - "in": "path", - "description": "ID of the bot", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -2538,38 +2461,7 @@ ], "responses": { "200": { - "description": "Bot already enabled", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/Bot", - "nullable": true - } - } - } - } - } - } - } - }, - "201": { - "description": "Bot enabled successfully", + "description": "Attendee map applied successfully", "content": { "application/json": { "schema": { @@ -2589,8 +2481,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/Bot", - "nullable": true + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } } } } @@ -2600,7 +2494,7 @@ } }, "400": { - "description": "Enabling bot errored", + "description": "Applying attendee map is not possible", "content": { "application/json": { "schema": { @@ -2638,12 +2532,14 @@ } } } - }, - "delete": { - "operationId": "bot-disable-bot", - "summary": "Disables a bot", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/request-assistance": { + "post": { + "operationId": "breakout_room-request-assistance", + "summary": "Request assistance", "tags": [ - "bot" + "breakout_room" ], "security": [ { @@ -2675,16 +2571,6 @@ "pattern": "^[a-z0-9]{4,30}$" } }, - { - "name": "botId", - "in": "path", - "description": "ID of the bot", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -2698,7 +2584,7 @@ ], "responses": { "200": { - "description": "Bot disabled successfully", + "description": "Assistance requested successfully", "content": { "application/json": { "schema": { @@ -2718,8 +2604,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/Bot", - "nullable": true + "$ref": "#/components/schemas/Room" } } } @@ -2729,7 +2614,7 @@ } }, "400": { - "description": "Disabling bot errored", + "description": "Requesting assistance is not possible", "content": { "application/json": { "schema": { @@ -2767,12 +2652,10 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}": { - "post": { - "operationId": "breakout_room-configure-breakout-rooms", - "summary": "Configure the breakout rooms", + }, + "delete": { + "operationId": "breakout_room-reset-request-for-assistance", + "summary": "Reset the request for assistance", "tags": [ "breakout_room" ], @@ -2785,43 +2668,6 @@ } ], "parameters": [ - { - "name": "mode", - "in": "query", - "description": "Mode of the breakout rooms", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1, - 2, - 3 - ] - } - }, - { - "name": "amount", - "in": "query", - "description": "Number of breakout rooms - Constants {@see BreakoutRoom::MINIMUM_ROOM_AMOUNT} and {@see BreakoutRoom::MAXIMUM_ROOM_AMOUNT}", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 1, - "maximum": 20 - } - }, - { - "name": "attendeeMap", - "in": "query", - "description": "Mapping of the attendees to breakout rooms", - "schema": { - "type": "string", - "default": "[]" - } - }, { "name": "apiVersion", "in": "path", @@ -2856,7 +2702,7 @@ ], "responses": { "200": { - "description": "Breakout rooms configured successfully", + "description": "Request for assistance reset successfully", "content": { "application/json": { "schema": { @@ -2876,10 +2722,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Room" - } + "$ref": "#/components/schemas/Room" } } } @@ -2889,7 +2732,7 @@ } }, "400": { - "description": "Configuring breakout rooms errored", + "description": "Resetting the request for assistance is not possible", "content": { "application/json": { "schema": { @@ -2927,10 +2770,12 @@ } } } - }, - "delete": { - "operationId": "breakout_room-remove-breakout-rooms", - "summary": "Remove the breakout rooms", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/rooms": { + "post": { + "operationId": "breakout_room-start-breakout-rooms", + "summary": "Start the breakout rooms", "tags": [ "breakout_room" ], @@ -2977,7 +2822,7 @@ ], "responses": { "200": { - "description": "Breakout rooms removed successfully", + "description": "Breakout rooms started successfully", "content": { "application/json": { "schema": { @@ -2997,101 +2842,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/Room" - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/broadcast": { - "post": { - "operationId": "breakout_room-broadcast-chat-message", - "summary": "Broadcast a chat message to all breakout rooms", - "tags": [ - "breakout_room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "message", - "in": "query", - "description": "Message to broadcast", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "201": { - "description": "Chat message broadcasted successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Room" - } + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } } } } @@ -3101,45 +2855,7 @@ } }, "400": { - "description": "Broadcasting chat message is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "413": { - "description": "Chat message too long", + "description": "Starting breakout rooms is not possible", "content": { "application/json": { "schema": { @@ -3177,12 +2893,10 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/attendees": { - "post": { - "operationId": "breakout_room-apply-attendee-map", - "summary": "Apply an attendee map to the breakout rooms", + }, + "delete": { + "operationId": "breakout_room-stop-breakout-rooms", + "summary": "Stop the breakout rooms", "tags": [ "breakout_room" ], @@ -3195,15 +2909,6 @@ } ], "parameters": [ - { - "name": "attendeeMap", - "in": "query", - "description": "JSON encoded mapping of the attendees to breakout rooms `array`", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "apiVersion", "in": "path", @@ -3238,7 +2943,7 @@ ], "responses": { "200": { - "description": "Attendee map applied successfully", + "description": "Breakout rooms stopped successfully", "content": { "application/json": { "schema": { @@ -3271,7 +2976,7 @@ } }, "400": { - "description": "Applying attendee map is not possible", + "description": "Stopping breakout rooms is not possible", "content": { "application/json": { "schema": { @@ -3311,10 +3016,10 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/request-assistance": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/switch": { "post": { - "operationId": "breakout_room-request-assistance", - "summary": "Request assistance", + "operationId": "breakout_room-switch-breakout-room", + "summary": "Switch to another breakout room", "tags": [ "breakout_room" ], @@ -3327,6 +3032,15 @@ } ], "parameters": [ + { + "name": "target", + "in": "query", + "description": "Target breakout room", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "apiVersion", "in": "path", @@ -3361,7 +3075,7 @@ ], "responses": { "200": { - "description": "Assistance requested successfully", + "description": "Switched to breakout room successfully", "content": { "application/json": { "schema": { @@ -3391,7 +3105,7 @@ } }, "400": { - "description": "Requesting assistance is not possible", + "description": "Switching to breakout room is not possible", "content": { "application/json": { "schema": { @@ -3429,14 +3143,17 @@ } } } - }, - "delete": { - "operationId": "breakout_room-reset-request-for-assistance", - "summary": "Reset the request for assistance", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}": { + "get": { + "operationId": "call-get-peers-for-call", + "summary": "Get the peers for a call", "tags": [ - "breakout_room" + "call" ], "security": [ + {}, { "bearer_auth": [] }, @@ -3452,9 +3169,9 @@ "schema": { "type": "string", "enum": [ - "v1" + "v4" ], - "default": "v1" + "default": "v4" } }, { @@ -3479,37 +3196,7 @@ ], "responses": { "200": { - "description": "Request for assistance reset successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/Room" - } - } - } - } - } - } - } - }, - "400": { - "description": "Resetting the request for assistance is not possible", + "description": "List of peers in the call returned", "content": { "application/json": { "schema": { @@ -3529,14 +3216,9 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } + "type": "array", + "items": { + "$ref": "#/components/schemas/CallPeer" } } } @@ -3547,16 +3229,15 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/rooms": { + }, "post": { - "operationId": "breakout_room-start-breakout-rooms", - "summary": "Start the breakout rooms", + "operationId": "call-join-call", + "summary": "Join a call", "tags": [ - "breakout_room" + "call" ], "security": [ + {}, { "bearer_auth": [] }, @@ -3566,1779 +3247,305 @@ ], "parameters": [ { - "name": "apiVersion", - "in": "path", - "required": true, + "name": "flags", + "in": "query", + "description": "In-Call flags", "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Breakout rooms started successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Room" - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Starting breakout rooms is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "breakout_room-stop-breakout-rooms", - "summary": "Stop the breakout rooms", - "tags": [ - "breakout_room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Breakout rooms stopped successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Room" - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Stopping breakout rooms is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/breakout-rooms/{token}/switch": { - "post": { - "operationId": "breakout_room-switch-breakout-room", - "summary": "Switch to another breakout room", - "tags": [ - "breakout_room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "target", - "in": "query", - "description": "Target breakout room", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Switched to breakout room successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/Room" - } - } - } - } - } - } - } - }, - "400": { - "description": "Switching to breakout room is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}": { - "get": { - "operationId": "call-get-peers-for-call", - "summary": "Get the peers for a call", - "tags": [ - "call" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "List of peers in the call returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CallPeer" - } - } - } - } - } - } - } - } - } - } - }, - "post": { - "operationId": "call-join-call", - "summary": "Join a call", - "tags": [ - "call" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "flags", - "in": "query", - "description": "In-Call flags", - "schema": { - "type": "integer", - "nullable": true, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15 - ] - } - }, - { - "name": "forcePermissions", - "in": "query", - "description": "In-call permissions", - "schema": { - "type": "integer", - "nullable": true, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139, - 140, - 141, - 142, - 143, - 144, - 145, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 174, - 175, - 176, - 177, - 178, - 179, - 180, - 181, - 182, - 183, - 184, - 185, - 186, - 187, - 188, - 189, - 190, - 191, - 192, - 193, - 194, - 195, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 210, - 211, - 212, - 213, - 214, - 215, - 216, - 217, - 218, - 219, - 220, - 221, - 222, - 223, - 224, - 225, - 226, - 227, - 228, - 229, - 230, - 231, - 232, - 233, - 234, - 235, - 236, - 237, - 238, - 239, - 240, - 241, - 242, - 243, - 244, - 245, - 246, - 247, - 248, - 249, - 250, - 251, - 252, - 253, - 254, - 255 - ] - } - }, - { - "name": "silent", - "in": "query", - "description": "Join the call silently", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "recordingConsent", - "in": "query", - "description": "When the user ticked a checkbox and agreed with being recorded (Only needed when the `config => call => recording-consent` capability is set to {@see RecordingService::CONSENT_REQUIRED_YES} or the capability is {@see RecordingService::CONSENT_REQUIRED_OPTIONAL} and the conversation `recordingConsent` value is {@see RecordingService::CONSENT_REQUIRED_YES} )", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Call joined successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "404": { - "description": "Call not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "400": { - "description": "No recording consent was given", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - }, - "put": { - "operationId": "call-update-call-flags", - "summary": "Update the in-call flags", - "tags": [ - "call" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "flags", - "in": "query", - "description": "New flags", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "In-call flags updated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "400": { - "description": "Updating in-call flags is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "404": { - "description": "Call session not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "call-leave-call", - "summary": "Leave a call", - "tags": [ - "call" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "all", - "in": "query", - "description": "whether to also terminate the call for all participants", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Call left successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "404": { - "description": "Call session not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/ring/{attendeeId}": { - "post": { - "operationId": "call-ring-attendee", - "summary": "Ring an attendee", - "tags": [ - "call" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "attendeeId", - "in": "path", - "description": "ID of the attendee to ring", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Attendee rang successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "400": { - "description": "Ringing attendee is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "404": { - "description": "Attendee could not be found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/dialout/{attendeeId}": { - "post": { - "operationId": "call-sip-dial-out", - "summary": "Call a SIP dial-out attendee", - "tags": [ - "call" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "attendeeId", - "in": "path", - "description": "ID of the attendee to call", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "201": { - "description": "Dial-out initiated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "400": { - "description": "SIP dial-out not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Participant could not be found or is a wrong type", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "501": { - "description": "SIP dial-out is not configured on the server", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/certificate/expiration": { - "get": { - "operationId": "certificate-get-certificate-expiration", - "summary": "Get the certificate expiration for a host", - "description": "This endpoint requires admin access", - "tags": [ - "certificate" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "host", - "in": "query", - "description": "Host to check", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Certificate expiration returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "expiration_in_days" - ], - "properties": { - "expiration_in_days": { - "type": "integer", - "format": "int64", - "nullable": true - } - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Getting certificate expiration is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}": { - "get": { - "operationId": "chat-receive-messages", - "summary": "Receives chat messages from the given room", - "description": "- Receiving the history ($lookIntoFuture=0): The next $limit messages after $lastKnownMessageId will be returned. The new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\n- Looking into the future ($lookIntoFuture=1): If there are currently no messages the response will not be sent immediately. Instead, HTTP connection will be kept open waiting for new messages to arrive and, when they do, then the response will be sent. The connection will not be kept open indefinitely, though; the number of seconds to wait for new messages to arrive can be set using the timeout parameter; the default timeout is 30 seconds, maximum timeout is 60 seconds. If the timeout ends a successful but empty response will be sent. If messages have been returned (status=200) the new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\nThe limit specifies the maximum number of messages that will be returned, although the actual number of returned messages could be lower if some messages are not visible to the participant. Note that if none of the messages are visible to the participant the returned number of messages will be 0, yet the status will still be 200. Also note that `X-Chat-Last-Given` may reference a message not visible and thus not returned, but it should be used nevertheless as the $lastKnownMessageId for the follow-up query.", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "lookIntoFuture", - "in": "query", - "description": "Polling for new messages (1) or getting the history of the chat (0)", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "limit", - "in": "query", - "description": "Number of chat messages to receive (100 by default, 200 at most)", - "schema": { - "type": "integer", - "format": "int64", - "default": 100 - } - }, - { - "name": "lastKnownMessageId", - "in": "query", - "description": "The last known message (serves as offset)", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "lastCommonReadId", - "in": "query", - "description": "The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages)", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "timeout", - "in": "query", - "description": "Number of seconds to wait for new messages (30 by default, 30 at most)", - "schema": { - "type": "integer", - "format": "int64", - "default": 30, - "minimum": 0, - "maximum": 30 - } - }, - { - "name": "setReadMarker", - "in": "query", - "description": "Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0", - "schema": { - "type": "integer", - "format": "int64", - "default": 1, + "type": "integer", + "nullable": true, "enum": [ 0, - 1 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15 ] } }, { - "name": "includeLastKnown", + "name": "forcePermissions", "in": "query", - "description": "Include the $lastKnownMessageId in the messages when 1 (default 0)", + "description": "In-call permissions", "schema": { "type": "integer", - "format": "int64", - "default": 0, + "nullable": true, "enum": [ 0, - 1 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255 ] } }, { - "name": "noStatusUpdate", + "name": "silent", "in": "query", - "description": "When the user status should not be automatically set to online set to 1 (default 0)", + "description": "Join the call silently", "schema": { "type": "integer", - "format": "int64", "default": 0, "enum": [ 0, @@ -5347,203 +3554,9 @@ } }, { - "name": "markNotificationsAsRead", - "in": "query", - "description": "Set to 0 when notifications should not be marked as read (default 1)", - "schema": { - "type": "integer", - "format": "int64", - "default": 1, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Messages returned", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - }, - "X-Chat-Last-Given": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - } - } - } - } - } - } - } - }, - "304": { - "description": "No messages", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - }, - "X-Chat-Last-Given": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - } - } - } - } - } - } - } - } - } - }, - "post": { - "operationId": "chat-send-message", - "summary": "Sends a new chat message to the given room", - "description": "The author and timestamp are automatically set to the current user/guest and time.", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "message", - "in": "query", - "description": "the message to send", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "actorDisplayName", - "in": "query", - "description": "for guests", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "referenceId", - "in": "query", - "description": "for the message to be able to later identify it again", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "replyTo", - "in": "query", - "description": "Parent id which this message is a reply to", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "silent", + "name": "recordingConsent", "in": "query", - "description": "If sent silent the chat message will not create any notifications", + "description": "When the user ticked a checkbox and agreed with being recorded (Only needed when the `config => call => recording-consent` capability is set to {@see RecordingService::CONSENT_REQUIRED_YES} or the capability is {@see RecordingService::CONSENT_REQUIRED_OPTIONAL} and the conversation `recordingConsent` value is {@see RecordingService::CONSENT_REQUIRED_YES} )", "schema": { "type": "integer", "default": 0, @@ -5560,9 +3573,9 @@ "schema": { "type": "string", "enum": [ - "v1" + "v4" ], - "default": "v1" + "default": "v4" } }, { @@ -5586,46 +3599,8 @@ } ], "responses": { - "201": { - "description": "Message sent successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/ChatMessageWithParent", - "nullable": true - } - } - } - } - } - } - } - }, - "400": { - "description": "Sending message is not possible", + "200": { + "description": "Call joined successfully", "content": { "application/json": { "schema": { @@ -5653,35 +3628,7 @@ } }, "404": { - "description": "Actor not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "413": { - "description": "Message too long", + "description": "Call not found", "content": { "application/json": { "schema": { @@ -5708,8 +3655,8 @@ } } }, - "429": { - "description": "Mention rate limit exceeded (guests only)", + "400": { + "description": "No recording consent was given", "content": { "application/json": { "schema": { @@ -5728,7 +3675,14 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } } } } @@ -5738,13 +3692,14 @@ } } }, - "delete": { - "operationId": "chat-clear-history", - "summary": "Clear the chat history", + "put": { + "operationId": "call-update-call-flags", + "summary": "Update the in-call flags", "tags": [ - "chat" + "call" ], "security": [ + {}, { "bearer_auth": [] }, @@ -5753,6 +3708,16 @@ } ], "parameters": [ + { + "name": "flags", + "in": "query", + "description": "New flags", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, { "name": "apiVersion", "in": "path", @@ -5760,9 +3725,9 @@ "schema": { "type": "string", "enum": [ - "v1" + "v4" ], - "default": "v1" + "default": "v4" } }, { @@ -5787,14 +3752,7 @@ ], "responses": { "200": { - "description": "History cleared successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, + "description": "In-call flags updated successfully", "content": { "application/json": { "schema": { @@ -5813,9 +3771,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "$ref": "#/components/schemas/ChatMessage" - } + "data": {} } } } @@ -5823,15 +3779,8 @@ } } }, - "202": { - "description": "History cleared successfully, but Matterbridge is configured, so the information can be replicated elsewhere", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, + "400": { + "description": "Updating in-call flags is not possible", "content": { "application/json": { "schema": { @@ -5850,9 +3799,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "$ref": "#/components/schemas/ChatMessage" - } + "data": {} } } } @@ -5860,8 +3807,8 @@ } } }, - "403": { - "description": "Missing permissions to clear history", + "404": { + "description": "Call session not found", "content": { "application/json": { "schema": { @@ -5889,16 +3836,15 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}": { + }, "delete": { - "operationId": "chat-delete-message", - "summary": "Delete a chat message", + "operationId": "call-leave-call", + "summary": "Leave a call", "tags": [ - "chat" + "call" ], "security": [ + {}, { "bearer_auth": [] }, @@ -5907,6 +3853,19 @@ } ], "parameters": [ + { + "name": "all", + "in": "query", + "description": "whether to also terminate the call for all participants", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, { "name": "apiVersion", "in": "path", @@ -5914,9 +3873,9 @@ "schema": { "type": "string", "enum": [ - "v1" + "v4" ], - "default": "v1" + "default": "v4" } }, { @@ -5928,17 +3887,6 @@ "pattern": "^[a-z0-9]{4,30}$" } }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -5952,14 +3900,7 @@ ], "responses": { "200": { - "description": "Message deleted successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, + "description": "Call left successfully", "content": { "application/json": { "schema": { @@ -5978,9 +3919,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "$ref": "#/components/schemas/ChatMessageWithParent" - } + "data": {} } } } @@ -5988,15 +3927,8 @@ } } }, - "202": { - "description": "Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, + "404": { + "description": "Call session not found", "content": { "application/json": { "schema": { @@ -6015,46 +3947,79 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "$ref": "#/components/schemas/ChatMessageWithParent" - } + "data": {} } } } } } } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/ring/{attendeeId}": { + "post": { + "operationId": "call-ring-attendee", + "summary": "Ring an attendee", + "tags": [ + "call" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "attendeeId", + "in": "path", + "description": "ID of the attendee to ring", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } }, - "400": { - "description": "Deleting message is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - }, - "403": { - "description": "Missing permissions to delete message", + } + ], + "responses": { + "200": { + "description": "Attendee rang successfully", "content": { "application/json": { "schema": { @@ -6081,8 +4046,8 @@ } } }, - "404": { - "description": "Message not found", + "400": { + "description": "Ringing attendee is not possible", "content": { "application/json": { "schema": { @@ -6109,8 +4074,8 @@ } } }, - "405": { - "description": "Deleting this message type is not allowed", + "404": { + "description": "Attendee could not be found", "content": { "application/json": { "schema": { @@ -6138,14 +4103,17 @@ } } } - }, - "put": { - "operationId": "chat-edit-message", - "summary": "Edit a chat message", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/dialout/{attendeeId}": { + "post": { + "operationId": "call-sip-dial-out", + "summary": "Call a SIP dial-out attendee", "tags": [ - "chat" + "call" ], "security": [ + {}, { "bearer_auth": [] }, @@ -6154,15 +4122,6 @@ } ], "parameters": [ - { - "name": "message", - "in": "query", - "description": "the message to send", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "apiVersion", "in": "path", @@ -6170,9 +4129,9 @@ "schema": { "type": "string", "enum": [ - "v1" + "v4" ], - "default": "v1" + "default": "v4" } }, { @@ -6185,14 +4144,13 @@ } }, { - "name": "messageId", + "name": "attendeeId", "in": "path", - "description": "ID of the message", + "description": "ID of the attendee to call", "required": true, "schema": { "type": "integer", - "format": "int64", - "minimum": 0 + "format": "int64" } }, { @@ -6207,15 +4165,8 @@ } ], "responses": { - "200": { - "description": "Message edited successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, + "201": { + "description": "Dial-out initiated successfully", "content": { "application/json": { "schema": { @@ -6235,7 +4186,15 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/ChatMessageWithParent" + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + } + } } } } @@ -6244,15 +4203,8 @@ } } }, - "202": { - "description": "Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, + "400": { + "description": "SIP dial-out not possible", "content": { "application/json": { "schema": { @@ -6272,7 +4224,15 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/ChatMessageWithParent" + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + } + } } } } @@ -6281,8 +4241,8 @@ } } }, - "400": { - "description": "Editing message is not possible, e.g. when the new message is empty or the message is too old", + "404": { + "description": "Participant could not be found or is a wrong type", "content": { "application/json": { "schema": { @@ -6303,12 +4263,12 @@ }, "data": { "type": "object", - "required": [ - "error" - ], "properties": { "error": { "type": "string" + }, + "message": { + "type": "string" } } } @@ -6319,8 +4279,8 @@ } } }, - "403": { - "description": "Missing permissions to edit message", + "501": { + "description": "SIP dial-out is not configured on the server", "content": { "application/json": { "schema": { @@ -6339,100 +4299,157 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } } } } } } } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}": { + "get": { + "operationId": "chat-receive-messages", + "summary": "Receives chat messages from the given room", + "description": "- Receiving the history ($lookIntoFuture=0): The next $limit messages after $lastKnownMessageId will be returned. The new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\n- Looking into the future ($lookIntoFuture=1): If there are currently no messages the response will not be sent immediately. Instead, HTTP connection will be kept open waiting for new messages to arrive and, when they do, then the response will be sent. The connection will not be kept open indefinitely, though; the number of seconds to wait for new messages to arrive can be set using the timeout parameter; the default timeout is 30 seconds, maximum timeout is 60 seconds. If the timeout ends a successful but empty response will be sent. If messages have been returned (status=200) the new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\nThe limit specifies the maximum number of messages that will be returned, although the actual number of returned messages could be lower if some messages are not visible to the participant. Note that if none of the messages are visible to the participant the returned number of messages will be 0, yet the status will still be 200. Also note that `X-Chat-Last-Given` may reference a message not visible and thus not returned, but it should be used nevertheless as the $lastKnownMessageId for the follow-up query.", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "lookIntoFuture", + "in": "query", + "description": "Polling for new messages (1) or getting the history of the chat (0)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of chat messages to receive (100 by default, 200 at most)", + "schema": { + "type": "integer", + "format": "int64", + "default": 100 + } + }, + { + "name": "lastKnownMessageId", + "in": "query", + "description": "The last known message (serves as offset)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "lastCommonReadId", + "in": "query", + "description": "The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "timeout", + "in": "query", + "description": "Number of seconds to wait for new messages (30 by default, 30 at most)", + "schema": { + "type": "integer", + "format": "int64", + "default": 30, + "minimum": 0, + "maximum": 30 } }, - "405": { - "description": "Editing this message type is not allowed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } + { + "name": "setReadMarker", + "in": "query", + "description": "Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0", + "schema": { + "type": "integer", + "format": "int64", + "default": 1, + "enum": [ + 0, + 1 + ] } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/context": { - "get": { - "operationId": "chat-get-message-context", - "summary": "Get the context of a message", - "tags": [ - "chat" - ], - "security": [ - {}, + }, { - "bearer_auth": [] + "name": "includeLastKnown", + "in": "query", + "description": "Include the $lastKnownMessageId in the messages when 1 (default 0)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "enum": [ + 0, + 1 + ] + } }, { - "basic_auth": [] - } - ], - "parameters": [ + "name": "noStatusUpdate", + "in": "query", + "description": "When the user status should not be automatically set to online set to 1 (default 0)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, { - "name": "limit", + "name": "markNotificationsAsRead", "in": "query", - "description": "Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages)", + "description": "Set to 0 when notifications should not be marked as read (default 1)", "schema": { "type": "integer", "format": "int64", - "default": 50, - "minimum": 1, - "maximum": 100 + "default": 1, + "enum": [ + 0, + 1 + ] } }, { @@ -6456,17 +4473,6 @@ "pattern": "^[a-z0-9]{4,30}$" } }, - { - "name": "messageId", - "in": "path", - "description": "The focused message which should be in the \"middle\" of the returned context", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -6480,7 +4486,7 @@ ], "responses": { "200": { - "description": "Message context returned", + "description": "Messages returned", "headers": { "X-Chat-Last-Common-Read": { "schema": { @@ -6570,16 +4576,16 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/reminder": { + }, "post": { - "operationId": "chat-set-reminder", - "summary": "Set a reminder for a chat message", + "operationId": "chat-send-message", + "summary": "Sends a new chat message to the given room", + "description": "The author and timestamp are automatically set to the current user/guest and time.", "tags": [ "chat" ], "security": [ + {}, { "bearer_auth": [] }, @@ -6589,16 +4595,56 @@ ], "parameters": [ { - "name": "timestamp", + "name": "message", "in": "query", - "description": "Timestamp of the reminder", + "description": "the message to send", "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "actorDisplayName", + "in": "query", + "description": "for guests", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "referenceId", + "in": "query", + "description": "for the message to be able to later identify it again", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "replyTo", + "in": "query", + "description": "Parent id which this message is a reply to", "schema": { "type": "integer", "format": "int64", + "default": 0, "minimum": 0 } }, + { + "name": "silent", + "in": "query", + "description": "If sent silent the chat message will not create any notifications", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, { "name": "apiVersion", "in": "path", @@ -6621,30 +4667,113 @@ } }, { - "name": "messageId", - "in": "path", - "description": "ID of the message", + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", "required": true, "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Message sent successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessageWithParent", + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Sending message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Actor not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "201": { - "description": "Reminder created successfully", + "413": { + "description": "Message too long", "content": { "application/json": { "schema": { @@ -6663,9 +4792,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "$ref": "#/components/schemas/ChatReminder" - } + "data": {} } } } @@ -6673,8 +4800,8 @@ } } }, - "404": { - "description": "Message not found", + "429": { + "description": "Mention rate limit exceeded (guests only)", "content": { "application/json": { "schema": { @@ -6703,9 +4830,9 @@ } } }, - "get": { - "operationId": "chat-get-reminder", - "summary": "Get the reminder for a chat message", + "delete": { + "operationId": "chat-clear-history", + "summary": "Clear the chat history", "tags": [ "chat" ], @@ -6739,17 +4866,6 @@ "pattern": "^[a-z0-9]{4,30}$" } }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -6763,7 +4879,14 @@ ], "responses": { "200": { - "description": "Reminder returned", + "description": "History cleared successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { @@ -6783,7 +4906,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/ChatReminder" + "$ref": "#/components/schemas/ChatMessage" } } } @@ -6792,8 +4915,45 @@ } } }, - "404": { - "description": "Message not found", + "202": { + "description": "History cleared successfully, but Matterbridge is configured, so the information can be replicated elsewhere", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessage" + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to clear history", "content": { "application/json": { "schema": { @@ -6821,10 +4981,12 @@ } } } - }, + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}": { "delete": { - "operationId": "chat-delete-reminder", - "summary": "Delete a chat reminder", + "operationId": "chat-delete-message", + "summary": "Delete a chat message", "tags": [ "chat" ], @@ -6882,7 +5044,14 @@ ], "responses": { "200": { - "description": "Reminder deleted successfully", + "description": "Message deleted successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { @@ -6901,7 +5070,9 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } } } } @@ -6909,8 +5080,15 @@ } } }, - "404": { - "description": "Message not found", + "202": { + "description": "Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { @@ -6929,86 +5107,74 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } } } } } } } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/read": { - "post": { - "operationId": "chat-set-read-marker", - "summary": "Set the read marker to a specific message", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "lastReadMessage", - "in": "query", - "description": "ID if the last read message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" + "400": { + "description": "Deleting message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Read marker set successfully", - "headers": { - "X-Chat-Last-Common-Read": { + "403": { + "description": "Missing permissions to delete message", + "content": { + "application/json": { "schema": { - "type": "string" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } } } - }, + } + }, + "404": { + "description": "Message not found", "content": { "application/json": { "schema": { @@ -7034,66 +5200,9 @@ } } } - } - } - }, - "delete": { - "operationId": "chat-mark-unread", - "summary": "Mark a chat as unread", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Read marker set successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, + "405": { + "description": "Deleting this message type is not allowed", "content": { "application/json": { "schema": { @@ -7121,17 +5230,14 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/mentions": { - "get": { - "operationId": "chat-mentions", - "summary": "Search for mentions", + }, + "put": { + "operationId": "chat-edit-message", + "summary": "Edit a chat message", "tags": [ "chat" ], "security": [ - {}, { "bearer_auth": [] }, @@ -7141,37 +5247,14 @@ ], "parameters": [ { - "name": "search", + "name": "message", "in": "query", - "description": "Text to search for", + "description": "the message to send", "required": true, "schema": { "type": "string" } }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of results", - "schema": { - "type": "integer", - "format": "int64", - "default": 20 - } - }, - { - "name": "includeStatus", - "in": "query", - "description": "Include the user statuses", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, { "name": "apiVersion", "in": "path", @@ -7193,6 +5276,17 @@ "pattern": "^[a-z0-9]{4,30}$" } }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -7206,7 +5300,14 @@ ], "responses": { "200": { - "description": "List of mention suggestions returned", + "description": "Message edited successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { @@ -7226,10 +5327,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMentionSuggestion" - } + "$ref": "#/components/schemas/ChatMessageWithParent" } } } @@ -7237,115 +5335,46 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share": { - "post": { - "operationId": "chat-share-object-to-chat", - "summary": "Sends a rich-object to the given room", - "description": "The author and timestamp are automatically set to the current user/guest and time.", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "objectType", - "in": "query", - "description": "Type of the object", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "objectId", - "in": "query", - "description": "ID of the object", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "metaData", - "in": "query", - "description": "Additional metadata", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "actorDisplayName", - "in": "query", - "description": "Guest name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "referenceId", - "in": "query", - "description": "Reference ID", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "201": { - "description": "Object shared successfully", + "202": { + "description": "Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services", "headers": { "X-Chat-Last-Common-Read": { "schema": { "type": "string" } } - }, + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "400": { + "description": "Editing message is not possible, e.g. when the new message is empty or the message is too old", "content": { "application/json": { "schema": { @@ -7365,8 +5394,15 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/ChatMessageWithParent", - "nullable": true + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } } } } @@ -7375,8 +5411,8 @@ } } }, - "400": { - "description": "Sharing object is not possible", + "403": { + "description": "Missing permissions to edit message", "content": { "application/json": { "schema": { @@ -7404,7 +5440,7 @@ } }, "404": { - "description": "Actor not found", + "description": "Message not found", "content": { "application/json": { "schema": { @@ -7431,8 +5467,8 @@ } } }, - "413": { - "description": "Message too long", + "405": { + "description": "Editing this message type is not allowed", "content": { "application/json": { "schema": { @@ -7460,10 +5496,12 @@ } } } - }, + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/context": { "get": { - "operationId": "chat-get-objects-shared-in-room", - "summary": "Get objects that are shared in the room", + "operationId": "chat-get-message-context", + "summary": "Get the context of a message", "tags": [ "chat" ], @@ -7477,36 +5515,16 @@ } ], "parameters": [ - { - "name": "objectType", - "in": "query", - "description": "Type of the objects", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "lastKnownMessageId", - "in": "query", - "description": "ID of the last known message", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, { "name": "limit", "in": "query", - "description": "Maximum number of objects", + "description": "Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages)", "schema": { "type": "integer", "format": "int64", - "default": 100, + "default": 50, "minimum": 1, - "maximum": 200 + "maximum": 100 } }, { @@ -7530,6 +5548,17 @@ "pattern": "^[a-z0-9]{4,30}$" } }, + { + "name": "messageId", + "in": "path", + "description": "The focused message which should be in the \"middle\" of the returned context", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -7543,8 +5572,13 @@ ], "responses": { "200": { - "description": "List of shared objects messages returned", + "description": "Message context returned", "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + }, "X-Chat-Last-Given": { "schema": { "type": "string" @@ -7572,7 +5606,52 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ChatMessage" + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No messages", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + }, + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageWithParent" } } } @@ -7585,15 +5664,14 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share/overview": { - "get": { - "operationId": "chat-get-objects-shared-in-room-overview", - "summary": "Get objects that are shared in the room overview", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/reminder": { + "post": { + "operationId": "chat-set-reminder", + "summary": "Set a reminder for a chat message", "tags": [ "chat" ], "security": [ - {}, { "bearer_auth": [] }, @@ -7603,15 +5681,14 @@ ], "parameters": [ { - "name": "limit", + "name": "timestamp", "in": "query", - "description": "Maximum number of objects", + "description": "Timestamp of the reminder", + "required": true, "schema": { "type": "integer", "format": "int64", - "default": 7, - "minimum": 1, - "maximum": 20 + "minimum": 0 } }, { @@ -7635,6 +5712,17 @@ "pattern": "^[a-z0-9]{4,30}$" } }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -7647,8 +5735,8 @@ } ], "responses": { - "200": { - "description": "List of shared objects messages of each type returned", + "201": { + "description": "Reminder created successfully", "content": { "application/json": { "schema": { @@ -7668,13 +5756,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMessage" - } - } + "$ref": "#/components/schemas/ChatReminder" } } } @@ -7682,17 +5764,42 @@ } } } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/file/{fileId}": { + }, "get": { - "operationId": "files_integration-get-room-by-file-id", - "summary": "Get the token of the room associated to the given file id", - "description": "This is the counterpart of self::getRoomByShareToken() for file ids instead of share tokens, although both return the same room token if the given file id and share token refer to the same file.\nIf there is no room associated to the given file id a new room is created; the new room is a public room associated with a \"file\" object with the given file id. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file).\nIn any case, to create or even get the token of the room, the file must be shared and the user must be the owner of a public share of the file (like a link share, for example) or have direct access to that file; an error is returned otherwise. A user has direct access to a file if she has access to it (or to an ancestor) through a user, group, circle or room share (but not through a link share, for example), or if she is the owner of such a file.", + "operationId": "chat-get-reminder", + "summary": "Get the reminder for a chat message", "tags": [ - "files_integration" + "chat" ], "security": [ { @@ -7716,13 +5823,23 @@ } }, { - "name": "fileId", + "name": "token", "in": "path", - "description": "ID of the file", "required": true, "schema": { "type": "string", - "pattern": "^.+$" + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 } }, { @@ -7738,7 +5855,7 @@ ], "responses": { "200": { - "description": "Room token returned", + "description": "Reminder returned", "content": { "application/json": { "schema": { @@ -7758,15 +5875,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "token" - ], - "properties": { - "token": { - "type": "string" - } - } + "$ref": "#/components/schemas/ChatReminder" } } } @@ -7775,8 +5884,8 @@ } } }, - "400": { - "description": "Rooms not allowed for shares", + "404": { + "description": "Message not found", "content": { "application/json": { "schema": { @@ -7797,35 +5906,21 @@ }, "data": {} } - } - } - } - } - } - }, - "404": { - "description": "Share not found", - "content": { - "text/plain": { - "schema": { - "type": "string" + } + } } } } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshare/{shareToken}": { - "get": { - "operationId": "files_integration-get-room-by-share-token", - "summary": "Returns the token of the room associated to the file of the given share token", - "description": "This is the counterpart of self::getRoomByFileId() for share tokens instead of file ids, although both return the same room token if the given file id and share token refer to the same file.\nIf there is no room associated to the file id of the given share token a new room is created; the new room is a public room associated with a \"file\" object with the file id of the given share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file).\nIn any case, to create or even get the token of the room, the file must be publicly shared (like a link share, for example); an error is returned otherwise.\nBesides the token of the room this also returns the current user ID and display name, if any; this is needed by the Talk sidebar to know the actual current user, as the public share page uses the incognito mode and thus logged-in users as seen as guests.", + }, + "delete": { + "operationId": "chat-delete-reminder", + "summary": "Delete a chat reminder", "tags": [ - "files_integration" + "chat" ], "security": [ - {}, { "bearer_auth": [] }, @@ -7847,13 +5942,23 @@ } }, { - "name": "shareToken", + "name": "token", "in": "path", - "description": "Token of the file share", "required": true, "schema": { "type": "string", - "pattern": "^.+$" + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 } }, { @@ -7869,53 +5974,7 @@ ], "responses": { "200": { - "description": "Room token and user info returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "token", - "userId", - "userDisplayName" - ], - "properties": { - "token": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "userDisplayName": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Rooms not allowed for shares", + "description": "Reminder deleted successfully", "content": { "application/json": { "schema": { @@ -7943,7 +6002,7 @@ } }, "404": { - "description": "Share not found", + "description": "Message not found", "content": { "application/json": { "schema": { @@ -7973,15 +6032,14 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/guest/{token}/name": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/read": { "post": { - "operationId": "guest-set-display-name", - "summary": "Set the display name as a guest", + "operationId": "chat-set-read-marker", + "summary": "Set the read marker to a specific message", "tags": [ - "guest" + "chat" ], "security": [ - {}, { "bearer_auth": [] }, @@ -7991,12 +6049,14 @@ ], "parameters": [ { - "name": "displayName", + "name": "lastReadMessage", "in": "query", - "description": "New display name", + "description": "ID if the last read message", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64", + "minimum": 0 } }, { @@ -8033,7 +6093,14 @@ ], "responses": { "200": { - "description": "Display name updated successfully", + "description": "Read marker set successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { @@ -8059,9 +6126,66 @@ } } } + } + } + }, + "delete": { + "operationId": "chat-mark-unread", + "summary": "Mark a chat as unread", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] }, - "403": { - "description": "Not a guest", + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Read marker set successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { @@ -8087,9 +6211,94 @@ } } } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/mentions": { + "get": { + "operationId": "chat-mentions", + "summary": "Search for mentions", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] }, - "404": { - "description": "Not a participant", + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of results", + "schema": { + "type": "integer", + "format": "int64", + "default": 20 + } + }, + { + "name": "includeStatus", + "in": "query", + "description": "Include the user statuses", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "List of mention suggestions returned", "content": { "application/json": { "schema": { @@ -8108,7 +6317,12 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMentionSuggestion" + } + } } } } @@ -8119,15 +6333,16 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/hostedsignalingserver/requesttrial": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share": { "post": { - "operationId": "hosted_signaling_server-request-trial", - "summary": "Request a trial account", - "description": "This endpoint requires admin access", + "operationId": "chat-share-object-to-chat", + "summary": "Sends a rich-object to the given room", + "description": "The author and timestamp are automatically set to the current user/guest and time.", "tags": [ - "hosted_signaling_server" + "chat" ], "security": [ + {}, { "bearer_auth": [] }, @@ -8137,48 +6352,48 @@ ], "parameters": [ { - "name": "url", + "name": "objectType", "in": "query", - "description": "Server URL", + "description": "Type of the object", "required": true, "schema": { "type": "string" } }, { - "name": "name", + "name": "objectId", "in": "query", - "description": "Display name of the user", + "description": "ID of the object", "required": true, "schema": { "type": "string" } }, { - "name": "email", + "name": "metaData", "in": "query", - "description": "Email of the user", - "required": true, + "description": "Additional metadata", "schema": { - "type": "string" + "type": "string", + "default": "" } }, { - "name": "language", + "name": "actorDisplayName", "in": "query", - "description": "Language of the user", - "required": true, + "description": "Guest name", "schema": { - "type": "string" + "type": "string", + "default": "" } }, { - "name": "country", + "name": "referenceId", "in": "query", - "description": "Country of the user", - "required": true, + "description": "Reference ID", "schema": { - "type": "string" + "type": "string", + "default": "" } }, { @@ -8193,6 +6408,15 @@ "default": "v1" } }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -8205,8 +6429,15 @@ } ], "responses": { - "200": { - "description": "Trial requested successfully", + "201": { + "description": "Object shared successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { @@ -8226,10 +6457,8 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/ChatMessageWithParent", + "nullable": true } } } @@ -8239,7 +6468,7 @@ } }, "400": { - "description": "Requesting trial is not possible", + "description": "Sharing object is not possible", "content": { "application/json": { "schema": { @@ -8258,17 +6487,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } + "data": {} } } } @@ -8276,8 +6495,8 @@ } } }, - "500": { - "description": "", + "404": { + "description": "Actor not found", "content": { "application/json": { "schema": { @@ -8296,17 +6515,35 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } + "data": {} + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } } } @@ -8315,17 +6552,15 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/hostedsignalingserver/delete": { - "delete": { - "operationId": "hosted_signaling_server-delete-account", - "summary": "Delete the account", - "description": "This endpoint requires admin access", + }, + "get": { + "operationId": "chat-get-objects-shared-in-room", + "summary": "Get objects that are shared in the room", "tags": [ - "hosted_signaling_server" + "chat" ], "security": [ + {}, { "bearer_auth": [] }, @@ -8334,6 +6569,38 @@ } ], "parameters": [ + { + "name": "objectType", + "in": "query", + "description": "Type of the objects", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lastKnownMessageId", + "in": "query", + "description": "ID of the last known message", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of objects", + "schema": { + "type": "integer", + "format": "int64", + "default": 100, + "minimum": 1, + "maximum": 200 + } + }, { "name": "apiVersion", "in": "path", @@ -8346,6 +6613,15 @@ "default": "v1" } }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -8358,74 +6634,15 @@ } ], "responses": { - "204": { - "description": "Account deleted successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "400": { - "description": "Deleting account is not possible", - "content": { - "application/json": { + "200": { + "description": "List of shared objects messages returned", + "headers": { + "X-Chat-Last-Given": { "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } - } - } + "type": "string" } } - } - }, - "500": { - "description": "", + }, "content": { "application/json": { "schema": { @@ -8445,14 +6662,9 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessage" } } } @@ -8465,14 +6677,15 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share/overview": { "get": { - "operationId": "matterbridge-get-bridge-of-room", - "summary": "Get bridge information of one room", + "operationId": "chat-get-objects-shared-in-room-overview", + "summary": "Get objects that are shared in the room overview", "tags": [ - "matterbridge" + "chat" ], "security": [ + {}, { "bearer_auth": [] }, @@ -8481,6 +6694,18 @@ } ], "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of objects", + "schema": { + "type": "integer", + "format": "int64", + "default": 7, + "minimum": 1, + "maximum": 20 + } + }, { "name": "apiVersion", "in": "path", @@ -8515,7 +6740,7 @@ ], "responses": { "200": { - "description": "Return list of configured bridges", + "description": "List of shared objects messages of each type returned", "content": { "application/json": { "schema": { @@ -8535,7 +6760,13 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/MatterbridgeWithProcessState" + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessage" + } + } } } } @@ -8545,12 +6776,15 @@ } } } - }, - "put": { - "operationId": "matterbridge-edit-bridge-of-room", - "summary": "Edit bridge information of one room", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/file/{fileId}": { + "get": { + "operationId": "files_integration-get-room-by-file-id", + "summary": "Get the token of the room associated to the given file id", + "description": "This is the counterpart of self::getRoomByShareToken() for file ids instead of share tokens, although both return the same room token if the given file id and share token refer to the same file.\nIf there is no room associated to the given file id a new room is created; the new room is a public room associated with a \"file\" object with the given file id. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file).\nIn any case, to create or even get the token of the room, the file must be shared and the user must be the owner of a public share of the file (like a link share, for example) or have direct access to that file; an error is returned otherwise. A user has direct access to a file if she has access to it (or to an ancestor) through a user, group, circle or room share (but not through a link share, for example), or if she is the owner of such a file.", "tags": [ - "matterbridge" + "files_integration" ], "security": [ { @@ -8561,27 +6795,6 @@ } ], "parameters": [ - { - "name": "enabled", - "in": "query", - "description": "If the bridge should be enabled", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "parts", - "in": "query", - "description": "New parts", - "schema": { - "type": "string" - } - }, { "name": "apiVersion", "in": "path", @@ -8595,12 +6808,13 @@ } }, { - "name": "token", + "name": "fileId", "in": "path", + "description": "ID of the file", "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,30}$" + "pattern": "^.+$" } }, { @@ -8616,7 +6830,7 @@ ], "responses": { "200": { - "description": "Bridge edited successfully", + "description": "Room token returned", "content": { "application/json": { "schema": { @@ -8636,7 +6850,15 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/MatterbridgeProcessState" + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string" + } + } } } } @@ -8645,8 +6867,8 @@ } } }, - "406": { - "description": "Editing bridge is not possible", + "400": { + "description": "Rooms not allowed for shares", "content": { "application/json": { "schema": { @@ -8665,33 +6887,37 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } + "data": {} } } } } } } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } - }, - "delete": { - "operationId": "matterbridge-delete-bridge-of-room", - "summary": "Delete bridge of one room", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshare/{shareToken}": { + "get": { + "operationId": "files_integration-get-room-by-share-token", + "summary": "Returns the token of the room associated to the file of the given share token", + "description": "This is the counterpart of self::getRoomByFileId() for share tokens instead of file ids, although both return the same room token if the given file id and share token refer to the same file.\nIf there is no room associated to the file id of the given share token a new room is created; the new room is a public room associated with a \"file\" object with the file id of the given share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file).\nIn any case, to create or even get the token of the room, the file must be publicly shared (like a link share, for example); an error is returned otherwise.\nBesides the token of the room this also returns the current user ID and display name, if any; this is needed by the Talk sidebar to know the actual current user, as the public share page uses the incognito mode and thus logged-in users as seen as guests.", "tags": [ - "matterbridge" + "files_integration" ], "security": [ + {}, { "bearer_auth": [] }, @@ -8713,12 +6939,13 @@ } }, { - "name": "token", + "name": "shareToken", "in": "path", + "description": "Token of the file share", "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,30}$" + "pattern": "^.+$" } }, { @@ -8734,7 +6961,7 @@ ], "responses": { "200": { - "description": "Bridge deleted successfully", + "description": "Room token and user info returned", "content": { "application/json": { "schema": { @@ -8754,7 +6981,23 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "boolean" + "type": "object", + "required": [ + "token", + "userId", + "userDisplayName" + ], + "properties": { + "token": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "userDisplayName": { + "type": "string" + } + } } } } @@ -8763,8 +7006,8 @@ } } }, - "406": { - "description": "Deleting bridge is not possible", + "400": { + "description": "Rooms not allowed for shares", "content": { "application/json": { "schema": { @@ -8783,17 +7026,35 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } } } @@ -8804,14 +7065,15 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}/process": { - "get": { - "operationId": "matterbridge-get-bridge-process-state", - "summary": "Get bridge process information", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/guest/{token}/name": { + "post": { + "operationId": "guest-set-display-name", + "summary": "Set the display name as a guest", "tags": [ - "matterbridge" + "guest" ], "security": [ + {}, { "bearer_auth": [] }, @@ -8820,6 +7082,15 @@ } ], "parameters": [ + { + "name": "displayName", + "in": "query", + "description": "New display name", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "apiVersion", "in": "path", @@ -8850,11 +7121,67 @@ "type": "boolean", "default": true } - } - ], - "responses": { - "200": { - "description": "Return list of running processes", + } + ], + "responses": { + "200": { + "description": "Display name updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Not a guest", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Not a participant", "content": { "application/json": { "schema": { @@ -8873,9 +7200,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "$ref": "#/components/schemas/MatterbridgeProcessState" - } + "data": {} } } } @@ -8886,13 +7211,12 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge": { - "delete": { - "operationId": "matterbridge_settings-stop-all-bridges", - "summary": "Stop all bridges", - "description": "This endpoint requires admin access", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}": { + "get": { + "operationId": "matterbridge-get-bridge-of-room", + "summary": "Get bridge information of one room", "tags": [ - "matterbridge_settings" + "matterbridge" ], "security": [ { @@ -8915,6 +7239,15 @@ "default": "v1" } }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -8928,37 +7261,7 @@ ], "responses": { "200": { - "description": "All bridges stopped successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "406": { - "description": "Stopping all bridges is not possible", + "description": "Return list of configured bridges", "content": { "application/json": { "schema": { @@ -8978,15 +7281,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } + "$ref": "#/components/schemas/MatterbridgeWithProcessState" } } } @@ -8996,15 +7291,12 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/version": { - "get": { - "operationId": "matterbridge_settings-get-matterbridge-version", - "summary": "Get Matterbridge version", - "description": "This endpoint requires admin access", + }, + "put": { + "operationId": "matterbridge-edit-bridge-of-room", + "summary": "Edit bridge information of one room", "tags": [ - "matterbridge_settings" + "matterbridge" ], "security": [ { @@ -9015,6 +7307,27 @@ } ], "parameters": [ + { + "name": "enabled", + "in": "query", + "description": "If the bridge should be enabled", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "parts", + "in": "query", + "description": "New parts", + "schema": { + "type": "string" + } + }, { "name": "apiVersion", "in": "path", @@ -9027,6 +7340,15 @@ "default": "v1" } }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -9040,7 +7362,7 @@ ], "responses": { "200": { - "description": "Bridge version returned", + "description": "Bridge edited successfully", "content": { "application/json": { "schema": { @@ -9060,15 +7382,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "string" - } - } + "$ref": "#/components/schemas/MatterbridgeProcessState" } } } @@ -9077,8 +7391,8 @@ } } }, - "400": { - "description": "Getting bridge version is not possible", + "406": { + "description": "Editing bridge is not possible", "content": { "application/json": { "schema": { @@ -9116,17 +7430,14 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}": { - "post": { - "operationId": "poll-create-poll", - "summary": "Create a poll", + }, + "delete": { + "operationId": "matterbridge-delete-bridge-of-room", + "summary": "Delete bridge of one room", "tags": [ - "poll" + "matterbridge" ], "security": [ - {}, { "bearer_auth": [] }, @@ -9135,51 +7446,6 @@ } ], "parameters": [ - { - "name": "question", - "in": "query", - "description": "Question of the poll", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "options[]", - "in": "query", - "description": "Options of the poll", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "resultMode", - "in": "query", - "description": "Mode how the results will be shown", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "maxVotes", - "in": "query", - "description": "Number of maximum votes per voter", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, { "name": "apiVersion", "in": "path", @@ -9213,8 +7479,8 @@ } ], "responses": { - "201": { - "description": "Poll created successfully", + "200": { + "description": "Bridge deleted successfully", "content": { "application/json": { "schema": { @@ -9234,7 +7500,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/Poll" + "type": "boolean" } } } @@ -9243,8 +7509,8 @@ } } }, - "400": { - "description": "Creating poll is not possible", + "406": { + "description": "Deleting bridge is not possible", "content": { "application/json": { "schema": { @@ -9263,7 +7529,17 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } } } } @@ -9274,15 +7550,14 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/{pollId}": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}/process": { "get": { - "operationId": "poll-show-poll", - "summary": "Get a poll", + "operationId": "matterbridge-get-bridge-process-state", + "summary": "Get bridge process information", "tags": [ - "poll" + "matterbridge" ], "security": [ - {}, { "bearer_auth": [] }, @@ -9312,17 +7587,6 @@ "pattern": "^[a-z0-9]{4,30}$" } }, - { - "name": "pollId", - "in": "path", - "description": "ID of the poll", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -9336,7 +7600,7 @@ ], "responses": { "200": { - "description": "Poll returned", + "description": "Return list of running processes", "content": { "application/json": { "schema": { @@ -9356,7 +7620,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/Poll" + "$ref": "#/components/schemas/MatterbridgeProcessState" } } } @@ -9364,40 +7628,14 @@ } } } - }, - "404": { - "description": "Poll not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } } } - }, + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}": { "post": { - "operationId": "poll-vote-poll", - "summary": "Vote on a poll", + "operationId": "poll-create-poll", + "summary": "Create a poll", "tags": [ "poll" ], @@ -9412,18 +7650,50 @@ ], "parameters": [ { - "name": "optionIds[]", + "name": "question", "in": "query", - "description": "IDs of the selected options", + "description": "Question of the poll", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "options[]", + "in": "query", + "description": "Options of the poll", + "required": true, "schema": { "type": "array", - "default": [], "items": { - "type": "integer", - "format": "int64" + "type": "string" } } }, + { + "name": "resultMode", + "in": "query", + "description": "Mode how the results will be shown", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "maxVotes", + "in": "query", + "description": "Number of maximum votes per voter", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, { "name": "apiVersion", "in": "path", @@ -9445,17 +7715,6 @@ "pattern": "^[a-z0-9]{4,30}$" } }, - { - "name": "pollId", - "in": "path", - "description": "ID of the poll", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -9468,8 +7727,8 @@ } ], "responses": { - "200": { - "description": "Voted successfully", + "201": { + "description": "Poll created successfully", "content": { "application/json": { "schema": { @@ -9499,35 +7758,7 @@ } }, "400": { - "description": "Voting is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "404": { - "description": "Poll not found", + "description": "Creating poll is not possible", "content": { "application/json": { "schema": { @@ -9555,10 +7786,12 @@ } } } - }, - "delete": { - "operationId": "poll-close-poll", - "summary": "Close a poll", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/{pollId}": { + "get": { + "operationId": "poll-show-poll", + "summary": "Get a poll", "tags": [ "poll" ], @@ -9617,7 +7850,7 @@ ], "responses": { "200": { - "description": "Poll closed successfully", + "description": "Poll returned", "content": { "application/json": { "schema": { @@ -9646,62 +7879,6 @@ } } }, - "400": { - "description": "Poll already closed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "403": { - "description": "Missing permissions to close poll", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, "404": { "description": "Poll not found", "content": { @@ -9729,45 +7906,14 @@ } } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshareauth": { + }, "post": { - "operationId": "public_share_auth-create-room", - "summary": "Creates a new room for video verification (requesting the password of a share)", - "description": "The new room is a public room associated with a \"share:password\" object with the ID of the share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms always created by a guest or user on behalf of a registered user, the sharer, who will be the owner of the room.\nThe share must have \"send password by Talk\" enabled; an error is returned otherwise.", + "operationId": "poll-vote-poll", + "summary": "Vote on a poll", "tags": [ - "public_share_auth" + "poll" ], "security": [ {}, @@ -9780,12 +7926,16 @@ ], "parameters": [ { - "name": "shareToken", + "name": "optionIds[]", "in": "query", - "description": "Token of the file share", - "required": true, + "description": "IDs of the selected options", "schema": { - "type": "string" + "type": "array", + "default": [], + "items": { + "type": "integer", + "format": "int64" + } } }, { @@ -9800,6 +7950,26 @@ "default": "v1" } }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "pollId", + "in": "path", + "description": "ID of the poll", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -9812,8 +7982,38 @@ } ], "responses": { - "201": { - "description": "Room created successfully", + "200": { + "description": "Voted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Poll" + } + } + } + } + } + } + } + }, + "400": { + "description": "Voting is not possible", "content": { "application/json": { "schema": { @@ -9832,25 +8032,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "token", - "name", - "displayName" - ], - "properties": { - "token": { - "type": "string" - }, - "name": { - "type": "string" - }, - "displayName": { - "type": "string" - } - } - } + "data": {} } } } @@ -9859,7 +8041,7 @@ } }, "404": { - "description": "Share not found", + "description": "Poll not found", "content": { "application/json": { "schema": { @@ -9887,14 +8069,12 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/reaction/{token}/{messageId}": { - "post": { - "operationId": "reaction-react", - "summary": "Add a reaction to a message", + }, + "delete": { + "operationId": "poll-close-poll", + "summary": "Close a poll", "tags": [ - "reaction" + "poll" ], "security": [ {}, @@ -9906,15 +8086,6 @@ } ], "parameters": [ - { - "name": "reaction", - "in": "query", - "description": "Emoji to add", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "apiVersion", "in": "path", @@ -9937,9 +8108,9 @@ } }, { - "name": "messageId", + "name": "pollId", "in": "path", - "description": "ID of the message", + "description": "ID of the poll", "required": true, "schema": { "type": "integer", @@ -9960,7 +8131,7 @@ ], "responses": { "200": { - "description": "Reaction already existed", + "description": "Poll closed successfully", "content": { "application/json": { "schema": { @@ -9980,13 +8151,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Reaction" - } - } + "$ref": "#/components/schemas/Poll" } } } @@ -9995,8 +8160,8 @@ } } }, - "201": { - "description": "Reaction added successfully", + "400": { + "description": "Poll already closed", "content": { "application/json": { "schema": { @@ -10015,15 +8180,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Reaction" - } - } - } + "data": {} } } } @@ -10031,8 +8188,8 @@ } } }, - "400": { - "description": "Adding reaction is not possible", + "403": { + "description": "Missing permissions to close poll", "content": { "application/json": { "schema": { @@ -10060,7 +8217,35 @@ } }, "404": { - "description": "Message not found", + "description": "Poll not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", "content": { "application/json": { "schema": { @@ -10088,12 +8273,15 @@ } } } - }, - "delete": { - "operationId": "reaction-delete", - "summary": "Delete a reaction from a message", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshareauth": { + "post": { + "operationId": "files_integration-create-room", + "summary": "Creates a new room for video verification (requesting the password of a share)", + "description": "The new room is a public room associated with a \"share:password\" object with the ID of the share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms always created by a guest or user on behalf of a registered user, the sharer, who will be the owner of the room.\nThe share must have \"send password by Talk\" enabled; an error is returned otherwise.", "tags": [ - "reaction" + "files_integration" ], "security": [ {}, @@ -10106,9 +8294,9 @@ ], "parameters": [ { - "name": "reaction", + "name": "shareToken", "in": "query", - "description": "Emoji to remove", + "description": "Token of the file share", "required": true, "schema": { "type": "string" @@ -10126,26 +8314,6 @@ "default": "v1" } }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -10158,8 +8326,8 @@ } ], "responses": { - "200": { - "description": "Reaction deleted successfully", + "201": { + "description": "Room created successfully", "content": { "application/json": { "schema": { @@ -10180,10 +8348,20 @@ }, "data": { "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Reaction" + "required": [ + "token", + "name", + "displayName" + ], + "properties": { + "token": { + "type": "string" + }, + "name": { + "type": "string" + }, + "displayName": { + "type": "string" } } } @@ -10194,36 +8372,8 @@ } } }, - "400": { - "description": "Deleting reaction is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, "404": { - "description": "Message not found", + "description": "Share not found", "content": { "application/json": { "schema": { @@ -10251,10 +8401,12 @@ } } } - }, - "get": { - "operationId": "reaction-get-reactions", - "summary": "Get a list of reactions for a message", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/reaction/{token}/{messageId}": { + "post": { + "operationId": "reaction-react", + "summary": "Add a reaction to a message", "tags": [ "reaction" ], @@ -10271,10 +8423,10 @@ { "name": "reaction", "in": "query", - "description": "Emoji to filter", + "description": "Emoji to add", + "required": true, "schema": { - "type": "string", - "nullable": true + "type": "string" } }, { @@ -10309,20 +8461,56 @@ "minimum": 0 } }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Reactions returned", + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Reaction already existed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reaction" + } + } + } + } + } + } + } + } + } + }, + "201": { + "description": "Reaction added successfully", "content": { "application/json": { "schema": { @@ -10357,8 +8545,36 @@ } } }, + "400": { + "description": "Adding reaction is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, "404": { - "description": "Message or reaction not found", + "description": "Message not found", "content": { "application/json": { "schema": { @@ -10386,17 +8602,15 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/welcome/{serverId}": { - "get": { - "operationId": "recording-get-welcome-message", - "summary": "Get the welcome message of a recording server", - "description": "This endpoint requires admin access", + }, + "delete": { + "operationId": "reaction-delete", + "summary": "Delete a reaction from a message", "tags": [ - "recording" + "reaction" ], "security": [ + {}, { "bearer_auth": [] }, @@ -10405,6 +8619,15 @@ } ], "parameters": [ + { + "name": "reaction", + "in": "query", + "description": "Emoji to remove", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "apiVersion", "in": "path", @@ -10418,9 +8641,18 @@ } }, { - "name": "serverId", + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", "in": "path", - "description": "ID of the server", + "description": "ID of the message", "required": true, "schema": { "type": "integer", @@ -10441,7 +8673,7 @@ ], "responses": { "200": { - "description": "Welcome message returned", + "description": "Reaction deleted successfully", "content": { "application/json": { "schema": { @@ -10462,13 +8694,10 @@ }, "data": { "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "number", - "format": "float" + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reaction" } } } @@ -10479,8 +8708,8 @@ } } }, - "404": { - "description": "Recording server not found or not configured", + "400": { + "description": "Deleting reaction is not possible", "content": { "application/json": { "schema": { @@ -10507,8 +8736,8 @@ } } }, - "500": { - "description": "", + "404": { + "description": "Message not found", "content": { "application/json": { "schema": { @@ -10527,17 +8756,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } + "data": {} } } } @@ -10546,16 +8765,15 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}": { - "post": { - "operationId": "recording-start", - "summary": "Start the recording", + }, + "get": { + "operationId": "reaction-get-reactions", + "summary": "Get a list of reactions for a message", "tags": [ - "recording" + "reaction" ], "security": [ + {}, { "bearer_auth": [] }, @@ -10565,13 +8783,12 @@ ], "parameters": [ { - "name": "status", + "name": "reaction", "in": "query", - "description": "Type of the recording", - "required": true, + "description": "Emoji to filter", "schema": { - "type": "integer", - "format": "int64" + "type": "string", + "nullable": true } }, { @@ -10595,6 +8812,17 @@ "pattern": "^[a-z0-9]{4,30}$" } }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -10608,7 +8836,7 @@ ], "responses": { "200": { - "description": "Recording started successfully", + "description": "Reactions returned", "content": { "application/json": { "schema": { @@ -10627,7 +8855,15 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reaction" + } + } + } } } } @@ -10635,8 +8871,8 @@ } } }, - "400": { - "description": "Starting recording is not possible", + "404": { + "description": "Message or reaction not found", "content": { "application/json": { "schema": { @@ -10655,17 +8891,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } + "data": {} } } } @@ -10674,10 +8900,12 @@ } } } - }, - "delete": { - "operationId": "recording-stop", - "summary": "Stop the recording", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}": { + "post": { + "operationId": "recording-start", + "summary": "Start the recording", "tags": [ "recording" ], @@ -10690,6 +8918,16 @@ } ], "parameters": [ + { + "name": "status", + "in": "query", + "description": "Type of the recording", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, { "name": "apiVersion", "in": "path", @@ -10724,7 +8962,7 @@ ], "responses": { "200": { - "description": "Recording stopped successfully", + "description": "Recording started successfully", "content": { "application/json": { "schema": { @@ -10752,7 +8990,7 @@ } }, "400": { - "description": "Stopping recording is not possible", + "description": "Starting recording is not possible", "content": { "application/json": { "schema": { @@ -10790,17 +9028,14 @@ } } } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/store": { - "post": { - "operationId": "recording-store", - "summary": "Store the recording", + }, + "delete": { + "operationId": "recording-stop", + "summary": "Stop the recording", "tags": [ "recording" ], "security": [ - {}, { "bearer_auth": [] }, @@ -10809,15 +9044,6 @@ } ], "parameters": [ - { - "name": "owner", - "in": "query", - "description": "User that will own the recording file", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "apiVersion", "in": "path", @@ -10852,35 +9078,7 @@ ], "responses": { "200": { - "description": "Recording stored successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "400": { - "description": "Storing recording is not possible", + "description": "Recording stopped successfully", "content": { "application/json": { "schema": { @@ -10893,23 +9091,13 @@ "type": "object", "required": [ "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } } } @@ -10917,8 +9105,8 @@ } } }, - "401": { - "description": "Missing permissions to store recording", + "400": { + "description": "Stopping recording is not possible", "content": { "application/json": { "schema": { @@ -10940,27 +9128,11 @@ "data": { "type": "object", "required": [ - "type", "error" ], "properties": { - "type": { - "type": "string" - }, "error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - } - } + "type": "string" } } } @@ -17017,108 +15189,6 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/settings/sip": { - "post": { - "operationId": "settings-setsip-settings", - "summary": "Update SIP bridge settings", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "sipGroups[]", - "in": "query", - "description": "New SIP groups", - "schema": { - "type": "array", - "default": [], - "items": { - "type": "string" - } - } - }, - { - "name": "dialInInfo", - "in": "query", - "description": "New dial info", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "sharedSecret", - "in": "query", - "description": "New shared secret", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Successfully set new SIP settings", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/settings/user": { "post": { "operationId": "settings-set-user-setting", @@ -17252,10 +15322,11 @@ }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/settings": { "get": { - "operationId": "signaling-get-settings", + "operationId": "internal_signaling-external_signaling-get-settings", "summary": "Get the signaling settings", "tags": [ - "signaling" + "internal_signaling", + "external_signaling" ], "security": [ {}, @@ -17389,169 +15460,12 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/welcome/{serverId}": { - "get": { - "operationId": "signaling-get-welcome-message", - "summary": "Get the welcome message from a signaling server", - "description": "Only available for logged-in users because guests can not use the apps right now.\nThis endpoint requires admin access", - "tags": [ - "signaling" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v3" - ], - "default": "v3" - } - }, - { - "name": "serverId", - "in": "path", - "description": "ID of the signaling server", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Welcome message returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Signaling server not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - }, - "version": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/{token}": { "post": { - "operationId": "signaling-send-messages", + "operationId": "internal_signaling-send-messages", "summary": "Send signaling messages", "tags": [ - "signaling" + "internal_signaling" ], "security": [ {}, @@ -17667,10 +15581,10 @@ } }, "get": { - "operationId": "signaling-pull-messages", + "operationId": "internal_signaling-pull-messages", "summary": "Get signaling messages", "tags": [ - "signaling" + "internal_signaling" ], "security": [ {}, @@ -17916,10 +15830,10 @@ }, "/ocs/v2.php/apps/spreed/temp-user-avatar": { "post": { - "operationId": "temp_avatar-post-avatar", + "operationId": "user_avatar-post-avatar", "summary": "Upload your avatar as a user", "tags": [ - "temp_avatar" + "user_avatar" ], "security": [ { @@ -18011,10 +15925,10 @@ } }, "delete": { - "operationId": "temp_avatar-delete-avatar", + "operationId": "user_avatar-delete-avatar", "summary": "Delete your avatar as a user", "tags": [ - "temp_avatar" + "user_avatar" ], "security": [ {