{ "openapi": "3.0.3", "info": { "title": "spreed-federation", "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" }, "silent": { "type": "boolean" } } }, "FederationInvite": { "type": "object", "required": [ "accessToken", "id", "state", "localRoomId", "remoteAttendeeId", "remoteServerUrl", "remoteToken", "roomName", "userId" ], "properties": { "accessToken": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "state": { "type": "integer", "format": "int64" }, "localRoomId": { "type": "integer", "format": "int64" }, "remoteAttendeeId": { "type": "integer", "format": "int64" }, "remoteServerUrl": { "type": "string" }, "remoteToken": { "type": "string" }, "roomName": { "type": "string" }, "userId": { "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 } ] }, "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}/federation/invitation/{id}": { "post": { "operationId": "federation-accept-share", "summary": "Accept a federation invites", "description": "🚧 Draft: Still work in progress", "tags": [ "federation" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "id", "in": "path", "description": "ID of the share", "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": "Invite accepted 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": "Invite can not be accepted (maybe it was accepted already)", "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" } } } } } } } } } }, "410": { "description": "Remote server could not be reached to notify about the acceptance", "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" } } } } } } } } } }, "404": { "description": "Invite can 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": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } } } } }, "delete": { "operationId": "federation-reject-share", "summary": "Decline a federation invites", "description": "🚧 Draft: Still work in progress", "tags": [ "federation" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "id", "in": "path", "description": "ID of the share", "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": "Invite declined 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": "Invite can 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": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } } } } } }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/federation/invitation": { "get": { "operationId": "federation-get-shares", "summary": "Get a list of federation invites", "description": "🚧 Draft: Still work in progress", "tags": [ "federation" ], "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": "Get list of received federation invites 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/FederationInvite" } } } } } } } } } } } } }, "tags": [] }