From 4218f719eac246441dbe0b323635fb653ebcd482 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Wed, 24 May 2023 16:34:27 +0200 Subject: [PATCH] Add OpenAPI specs Signed-off-by: jld3103 --- apps/cloud_federation_api/openapi.json | 402 +++ apps/dashboard/openapi.json | 293 ++ apps/dav/openapi.json | 251 ++ apps/files_sharing/openapi.json | 3506 ++++++++++++++++++ apps/oauth2/openapi.json | 216 ++ apps/provisioning_api/openapi.json | 4532 ++++++++++++++++++++++++ apps/settings/openapi.json | 65 + apps/theming/openapi.json | 1206 +++++++ apps/user_status/openapi.json | 1154 ++++++ apps/weather_status/openapi.json | 912 +++++ core/openapi.json | 4474 +++++++++++++++++++++++ 11 files changed, 17011 insertions(+) create mode 100644 apps/cloud_federation_api/openapi.json create mode 100644 apps/dashboard/openapi.json create mode 100644 apps/dav/openapi.json create mode 100644 apps/files_sharing/openapi.json create mode 100644 apps/oauth2/openapi.json create mode 100644 apps/provisioning_api/openapi.json create mode 100644 apps/settings/openapi.json create mode 100644 apps/theming/openapi.json create mode 100644 apps/user_status/openapi.json create mode 100644 apps/weather_status/openapi.json create mode 100644 core/openapi.json diff --git a/apps/cloud_federation_api/openapi.json b/apps/cloud_federation_api/openapi.json new file mode 100644 index 0000000000000..f017b864a2727 --- /dev/null +++ b/apps/cloud_federation_api/openapi.json @@ -0,0 +1,402 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "cloud_federation_api", + "version": "0.0.1", + "description": "Enable clouds to communicate with each other and exchange data", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "AddShare": { + "type": "object", + "required": [ + "recipientDisplayName" + ], + "properties": { + "recipientDisplayName": { + "type": "string" + } + } + }, + "Capabilities": { + "type": "object", + "required": [ + "ocm" + ], + "properties": { + "ocm": { + "type": "object", + "required": [ + "enabled", + "apiVersion", + "endPoint", + "resourceTypes" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "apiVersion": { + "type": "string" + }, + "endPoint": { + "type": "string" + }, + "resourceTypes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "shareTypes", + "protocols" + ], + "properties": { + "name": { + "type": "string" + }, + "shareTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "protocols": { + "type": "object", + "required": [ + "webdav" + ], + "properties": { + "webdav": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "Error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + }, + "ValidationError": { + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "required": [ + "validationErrors" + ], + "properties": { + "validationErrors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": { + "name": { + "type": "string" + }, + "message": { + "type": "string", + "nullable": true + } + } + } + } + } + } + ] + } + } + }, + "paths": { + "/index.php/ocm/shares": { + "post": { + "operationId": "request_handler-add-share", + "summary": "Add share", + "tags": [ + "request_handler" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "shareWith", + "in": "query", + "description": "The user who the share will be shared with", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "The resource name (e.g. document.odt)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "description", + "in": "query", + "description": "Share description", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "providerId", + "in": "query", + "description": "Resource UID on the provider side", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "owner", + "in": "query", + "description": "Provider specific UID of the user who owns the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ownerDisplayName", + "in": "query", + "description": "Display name of the user who shared the item", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sharedBy", + "in": "query", + "description": "Provider specific UID of the user who shared the resource", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sharedByDisplayName", + "in": "query", + "description": "Display name of the user who shared the resource", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "protocol", + "in": "query", + "description": "e,.g. ['name' => 'webdav', 'options' => ['username' => 'john', 'permissions' => 31]]", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shareType", + "in": "query", + "description": "'group' or 'user' share", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceType", + "in": "query", + "description": "'file', 'calendar',...", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "The notification was successfully received. The display name of the recipient might be returned in the body", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddShare" + } + } + } + }, + "400": { + "description": "Bad request due to invalid parameters, e.g. when `shareWith` is not found or required properties are missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "501": { + "description": "Share type or the resource type is not supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/index.php/ocm/notifications": { + "post": { + "operationId": "request_handler-receive-notification", + "summary": "Send a notification about an existing share", + "tags": [ + "request_handler" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "notificationType", + "in": "query", + "description": "Notification type, e.g. SHARE_ACCEPTED", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceType", + "in": "query", + "description": "calendar, file, contact,...", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "providerId", + "in": "query", + "description": "ID of the share", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "notification", + "in": "query", + "description": "The actual payload of the notification", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "201": { + "description": "The notification was successfully received", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + }, + "400": { + "description": "Bad request due to invalid parameters, e.g. when `type` is invalid or missing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "403": { + "description": "Getting resource not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "501": { + "description": "The resource type is not supported", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "request_handler", + "description": "Open-Cloud-Mesh-API" + } + ] +} \ No newline at end of file diff --git a/apps/dashboard/openapi.json b/apps/dashboard/openapi.json new file mode 100644 index 0000000000000..cf706f1f55d34 --- /dev/null +++ b/apps/dashboard/openapi.json @@ -0,0 +1,293 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "dashboard", + "version": "0.0.1", + "description": "Dashboard app", + "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" + } + } + }, + "Widget": { + "type": "object", + "required": [ + "id", + "title", + "order", + "icon_class", + "icon_url", + "widget_url", + "item_icons_round" + ], + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "order": { + "type": "integer", + "format": "int64" + }, + "icon_class": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "widget_url": { + "type": "string", + "nullable": true + }, + "item_icons_round": { + "type": "boolean" + }, + "buttons": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "text", + "link" + ], + "properties": { + "type": { + "type": "string" + }, + "text": { + "type": "string" + }, + "link": { + "type": "string" + } + } + } + } + } + }, + "WidgetItem": { + "type": "object", + "required": [ + "subtitle", + "title", + "link", + "iconUrl", + "sinceId" + ], + "properties": { + "subtitle": { + "type": "string" + }, + "title": { + "type": "string" + }, + "link": { + "type": "string" + }, + "iconUrl": { + "type": "string" + }, + "sinceId": { + "type": "string" + } + } + } + } + }, + "paths": { + "/ocs/v2.php/apps/dashboard/api/v1/widgets": { + "get": { + "operationId": "dashboard_api-get-widgets", + "summary": "Get the widgets", + "tags": [ + "dashboard_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/Widget" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/dashboard/api/v1/widget-items": { + "get": { + "operationId": "dashboard_api-get-widget-items", + "summary": "Get the items for the widgets", + "tags": [ + "dashboard_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "sinceIds", + "in": "query", + "description": "Array indexed by widget Ids, contains date/id from which we want the new items", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit number of result items per widget", + "schema": { + "type": "integer", + "format": "int64", + "default": 7 + } + }, + { + "name": "widgets", + "in": "query", + "description": "Limit results to specific widgets", + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WidgetItem" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/apps/dav/openapi.json b/apps/dav/openapi.json new file mode 100644 index 0000000000000..21a4500db09f1 --- /dev/null +++ b/apps/dav/openapi.json @@ -0,0 +1,251 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "dav", + "version": "0.0.1", + "description": "WebDAV endpoint", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Capabilities": { + "type": "object", + "required": [ + "dav" + ], + "properties": { + "dav": { + "type": "object", + "required": [ + "chunking" + ], + "properties": { + "chunking": { + "type": "string" + }, + "bulkupload": { + "type": "string" + } + } + } + } + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + } + } + }, + "paths": { + "/ocs/v2.php/apps/dav/api/v1/direct": { + "post": { + "operationId": "direct-get-url", + "summary": "Get a direct link to a file", + "tags": [ + "direct" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "fileId", + "in": "query", + "description": "ID of the file", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "expirationTime", + "in": "query", + "description": "Duration until the link expires", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Direct link 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": [ + "url" + ], + "properties": { + "url": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "File not found", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "400": { + "description": "Getting direct link is not possible", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to get direct link", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/apps/files_sharing/openapi.json b/apps/files_sharing/openapi.json new file mode 100644 index 0000000000000..00cc171d5d98b --- /dev/null +++ b/apps/files_sharing/openapi.json @@ -0,0 +1,3506 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "files_sharing", + "version": "0.0.1", + "description": "File sharing", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Capabilities": { + "type": "object", + "required": [ + "files_sharing" + ], + "properties": { + "files_sharing": { + "type": "object", + "required": [ + "api_enabled", + "public", + "user", + "resharing", + "federation", + "sharee" + ], + "properties": { + "api_enabled": { + "type": "boolean" + }, + "public": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "password": { + "type": "object", + "required": [ + "enforced", + "askForOptionalPassword" + ], + "properties": { + "enforced": { + "type": "boolean" + }, + "askForOptionalPassword": { + "type": "boolean" + } + } + }, + "multiple_links": { + "type": "boolean" + }, + "expire_date": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "days": { + "type": "integer", + "format": "int64" + }, + "enforced": { + "type": "boolean" + } + } + }, + "expire_date_internal": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "days": { + "type": "integer", + "format": "int64" + }, + "enforced": { + "type": "boolean" + } + } + }, + "expire_date_remote": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "days": { + "type": "integer", + "format": "int64" + }, + "enforced": { + "type": "boolean" + } + } + }, + "send_mail": { + "type": "boolean" + }, + "upload": { + "type": "boolean" + }, + "upload_files_drop": { + "type": "boolean" + } + } + }, + "user": { + "type": "object", + "required": [ + "send_mail" + ], + "properties": { + "send_mail": { + "type": "boolean" + }, + "expire_date": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "resharing": { + "type": "boolean" + }, + "group_sharing": { + "type": "boolean" + }, + "group": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "expire_date": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "default_permissions": { + "type": "integer", + "format": "int64" + }, + "federation": { + "type": "object", + "required": [ + "outgoing", + "incoming", + "expire_date", + "expire_date_supported" + ], + "properties": { + "outgoing": { + "type": "boolean" + }, + "incoming": { + "type": "boolean" + }, + "expire_date": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "expire_date_supported": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "sharee": { + "type": "object", + "required": [ + "query_lookup_default", + "always_show_unique" + ], + "properties": { + "query_lookup_default": { + "type": "boolean" + }, + "always_show_unique": { + "type": "boolean" + } + } + } + } + } + } + }, + "DeletedShare": { + "type": "object", + "required": [ + "id", + "share_type", + "uid_owner", + "displayname_owner", + "permissions", + "stime", + "uid_file_owner", + "displayname_file_owner", + "path", + "item_type", + "mimetype", + "storage", + "item_source", + "file_source", + "file_parent", + "file_target", + "expiration", + "share_with", + "share_with_displayname", + "share_with_link" + ], + "properties": { + "id": { + "type": "string" + }, + "share_type": { + "type": "integer", + "format": "int64" + }, + "uid_owner": { + "type": "string" + }, + "displayname_owner": { + "type": "string" + }, + "permissions": { + "type": "integer", + "format": "int64" + }, + "stime": { + "type": "integer", + "format": "int64" + }, + "uid_file_owner": { + "type": "string" + }, + "displayname_file_owner": { + "type": "string" + }, + "path": { + "type": "string" + }, + "item_type": { + "type": "string" + }, + "mimetype": { + "type": "string" + }, + "storage": { + "type": "integer", + "format": "int64" + }, + "item_source": { + "type": "integer", + "format": "int64" + }, + "file_source": { + "type": "integer", + "format": "int64" + }, + "file_parent": { + "type": "integer", + "format": "int64" + }, + "file_target": { + "type": "integer", + "format": "int64" + }, + "expiration": { + "type": "string", + "nullable": true + }, + "share_with": { + "type": "string", + "nullable": true + }, + "share_with_displayname": { + "type": "string", + "nullable": true + }, + "share_with_link": { + "type": "string", + "nullable": true + } + } + }, + "Lookup": { + "type": "object", + "required": [ + "value", + "verified" + ], + "properties": { + "value": { + "type": "string" + }, + "verified": { + "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" + } + } + }, + "RemoteShare": { + "type": "object", + "required": [ + "accepted", + "file_id", + "id", + "mimetype", + "mountpoint", + "mtime", + "name", + "owner", + "parent", + "permissions", + "remote", + "remote_id", + "share_token", + "share_type", + "type", + "user" + ], + "properties": { + "accepted": { + "type": "boolean" + }, + "file_id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64" + }, + "mimetype": { + "type": "string", + "nullable": true + }, + "mountpoint": { + "type": "string" + }, + "mtime": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "parent": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "permissions": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "remote": { + "type": "string" + }, + "remote_id": { + "type": "string" + }, + "share_token": { + "type": "string" + }, + "share_type": { + "type": "integer", + "format": "int64" + }, + "type": { + "type": "string", + "nullable": true + }, + "user": { + "type": "string" + } + } + }, + "Share": { + "type": "object", + "required": [ + "attributes", + "can_delete", + "can_edit", + "displayname_file_owner", + "displayname_owner", + "expiration", + "file_parent", + "file_source", + "file_target", + "has_preview", + "id", + "item_source", + "item_type", + "label", + "mail_send", + "mimetype", + "note", + "password", + "password_expiration_time", + "path", + "permissions", + "send_password_by_talk", + "share_type", + "share_with", + "share_with_avatar", + "share_with_displayname", + "share_with_link", + "status", + "stime", + "storage", + "storage_id", + "token", + "uid_file_owner", + "uid_owner", + "url" + ], + "properties": { + "attributes": { + "type": "string", + "nullable": true + }, + "can_delete": { + "type": "boolean" + }, + "can_edit": { + "type": "boolean" + }, + "displayname_file_owner": { + "type": "string" + }, + "displayname_owner": { + "type": "string" + }, + "expiration": { + "type": "string", + "nullable": true + }, + "file_parent": { + "type": "integer", + "format": "int64" + }, + "file_source": { + "type": "integer", + "format": "int64" + }, + "file_target": { + "type": "string" + }, + "has_preview": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "item_source": { + "type": "integer", + "format": "int64" + }, + "item_type": { + "type": "string" + }, + "label": { + "type": "string" + }, + "mail_send": { + "type": "integer", + "format": "int64" + }, + "mimetype": { + "type": "string" + }, + "note": { + "type": "string" + }, + "password": { + "type": "string", + "nullable": true + }, + "password_expiration_time": { + "type": "string", + "nullable": true + }, + "path": { + "type": "string" + }, + "permissions": { + "type": "integer", + "format": "int64" + }, + "send_password_by_talk": { + "type": "boolean", + "nullable": true + }, + "share_type": { + "type": "integer", + "format": "int64" + }, + "share_with": { + "type": "string", + "nullable": true + }, + "share_with_avatar": { + "type": "string", + "nullable": true + }, + "share_with_displayname": { + "type": "string", + "nullable": true + }, + "share_with_link": { + "type": "string", + "nullable": true + }, + "status": { + "nullable": true, + "oneOf": [ + { + "type": "object", + "required": [ + "status", + "message", + "icon", + "clearAt" + ], + "properties": { + "status": { + "type": "string" + }, + "message": { + "type": "string", + "nullable": true + }, + "icon": { + "type": "string", + "nullable": true + }, + "clearAt": { + "type": "integer", + "format": "int64", + "nullable": true + } + } + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "stime": { + "type": "integer", + "format": "int64" + }, + "storage": { + "type": "integer", + "format": "int64" + }, + "storage_id": { + "type": "string" + }, + "token": { + "type": "string", + "nullable": true + }, + "uid_file_owner": { + "type": "string" + }, + "uid_owner": { + "type": "string" + }, + "url": { + "type": "string", + "nullable": true + } + } + }, + "ShareInfo": { + "type": "object", + "required": [ + "id", + "parentId", + "mtime", + "name", + "permissions", + "mimetype", + "size", + "type", + "etag", + "children" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "parentId": { + "type": "integer", + "format": "int64" + }, + "mtime": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "permissions": { + "type": "integer", + "format": "int64" + }, + "mimetype": { + "type": "string" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "type": { + "type": "string" + }, + "etag": { + "type": "string" + }, + "children": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + }, + "Sharee": { + "type": "object", + "required": [ + "count", + "label" + ], + "properties": { + "count": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "label": { + "type": "string" + } + } + }, + "ShareeCircle": { + "allOf": [ + { + "$ref": "#/components/schemas/Sharee" + }, + { + "type": "object", + "required": [ + "shareWithDescription", + "value" + ], + "properties": { + "shareWithDescription": { + "type": "string" + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/ShareeValue" + }, + { + "type": "object", + "required": [ + "circle" + ], + "properties": { + "circle": { + "type": "string" + } + } + } + ] + } + } + } + ] + }, + "ShareeEmail": { + "allOf": [ + { + "$ref": "#/components/schemas/Sharee" + }, + { + "type": "object", + "required": [ + "uuid", + "name", + "type", + "shareWithDisplayNameUnique", + "value" + ], + "properties": { + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "shareWithDisplayNameUnique": { + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/ShareeValue" + } + } + } + ] + }, + "ShareeLookup": { + "allOf": [ + { + "$ref": "#/components/schemas/Sharee" + }, + { + "type": "object", + "required": [ + "extra", + "value" + ], + "properties": { + "extra": { + "type": "object", + "required": [ + "federationId", + "name", + "email", + "address", + "website", + "twitter", + "phone", + "twitter_signature", + "website_signature", + "userid" + ], + "properties": { + "federationId": { + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/Lookup", + "nullable": true + }, + "email": { + "$ref": "#/components/schemas/Lookup", + "nullable": true + }, + "address": { + "$ref": "#/components/schemas/Lookup", + "nullable": true + }, + "website": { + "$ref": "#/components/schemas/Lookup", + "nullable": true + }, + "twitter": { + "$ref": "#/components/schemas/Lookup", + "nullable": true + }, + "phone": { + "$ref": "#/components/schemas/Lookup", + "nullable": true + }, + "twitter_signature": { + "$ref": "#/components/schemas/Lookup", + "nullable": true + }, + "website_signature": { + "$ref": "#/components/schemas/Lookup", + "nullable": true + }, + "userid": { + "$ref": "#/components/schemas/Lookup", + "nullable": true + } + } + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/ShareeValue" + }, + { + "type": "object", + "required": [ + "globalScale" + ], + "properties": { + "globalScale": { + "type": "boolean" + } + } + } + ] + } + } + } + ] + }, + "ShareeRemote": { + "allOf": [ + { + "$ref": "#/components/schemas/Sharee" + }, + { + "type": "object", + "required": [ + "uuid", + "name", + "type", + "value" + ], + "properties": { + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/ShareeValue" + }, + { + "type": "object", + "required": [ + "server" + ], + "properties": { + "server": { + "type": "string" + } + } + } + ] + } + } + } + ] + }, + "ShareeRemoteGroup": { + "allOf": [ + { + "$ref": "#/components/schemas/Sharee" + }, + { + "type": "object", + "required": [ + "guid", + "name", + "value" + ], + "properties": { + "guid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/ShareeValue" + }, + { + "type": "object", + "required": [ + "server" + ], + "properties": { + "server": { + "type": "string" + } + } + } + ] + } + } + } + ] + }, + "ShareeUser": { + "allOf": [ + { + "$ref": "#/components/schemas/Sharee" + }, + { + "type": "object", + "required": [ + "subline", + "icon", + "shareWithDisplayNameUnique", + "status", + "value" + ], + "properties": { + "subline": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "shareWithDisplayNameUnique": { + "type": "string" + }, + "status": { + "type": "object", + "required": [ + "status", + "message", + "icon", + "clearAt" + ], + "properties": { + "status": { + "type": "string" + }, + "message": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "clearAt": { + "type": "integer", + "format": "int64", + "nullable": true + } + } + }, + "value": { + "$ref": "#/components/schemas/ShareeValue" + } + } + } + ] + }, + "ShareeValue": { + "type": "object", + "required": [ + "shareType", + "shareWith" + ], + "properties": { + "shareType": { + "type": "integer", + "format": "int64" + }, + "shareWith": { + "type": "string" + } + } + }, + "ShareesRecommendedResult": { + "type": "object", + "required": [ + "exact", + "emails", + "groups", + "remote_groups", + "remotes", + "users" + ], + "properties": { + "exact": { + "type": "object", + "required": [ + "emails", + "groups", + "remote_groups", + "remotes", + "users" + ], + "properties": { + "emails": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeEmail" + } + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sharee" + } + }, + "remote_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemoteGroup" + } + }, + "remotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemote" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeUser" + } + } + } + }, + "emails": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeEmail" + } + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sharee" + } + }, + "remote_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemoteGroup" + } + }, + "remotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemote" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeUser" + } + } + } + }, + "ShareesSearchResult": { + "type": "object", + "required": [ + "exact", + "circles", + "emails", + "groups", + "lookup", + "remote_groups", + "remotes", + "rooms", + "users", + "lookupEnabled" + ], + "properties": { + "exact": { + "type": "object", + "required": [ + "circles", + "emails", + "groups", + "remote_groups", + "remotes", + "rooms", + "users" + ], + "properties": { + "circles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeCircle" + } + }, + "emails": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeEmail" + } + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sharee" + } + }, + "remote_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemoteGroup" + } + }, + "remotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemote" + } + }, + "rooms": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sharee" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeUser" + } + } + } + }, + "circles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeCircle" + } + }, + "emails": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeEmail" + } + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sharee" + } + }, + "lookup": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeLookup" + } + }, + "remote_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemoteGroup" + } + }, + "remotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemote" + } + }, + "rooms": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sharee" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeUser" + } + }, + "lookupEnabled": { + "type": "boolean" + } + } + } + } + }, + "paths": { + "/index.php/apps/files_sharing/shareinfo": { + "post": { + "operationId": "share_info-info", + "summary": "Get the info about a share", + "tags": [ + "share_info" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "t", + "in": "query", + "description": "Token of the share", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "description": "Password of the share", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "dir", + "in": "query", + "description": "Subdirectory to get info about", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "depth", + "in": "query", + "description": "Maximum depth to get info about", + "schema": { + "type": "integer", + "format": "int64", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "Share info returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShareInfo" + } + } + } + }, + "403": { + "description": "Getting share info not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/files_sharing/api/v1/shares": { + "get": { + "operationId": "shareapi-get-shares", + "summary": "Get shares of the current user", + "tags": [ + "shareapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "shared_with_me", + "in": "query", + "description": "Only get shares with the current user", + "schema": { + "type": "string", + "default": "false" + } + }, + { + "name": "reshares", + "in": "query", + "description": "Only get shares by the current user and reshares", + "schema": { + "type": "string", + "default": "false" + } + }, + { + "name": "subfiles", + "in": "query", + "description": "Only get all shares in a folder", + "schema": { + "type": "string", + "default": "false" + } + }, + { + "name": "path", + "in": "query", + "description": "Get shares for a specific path", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "include_tags", + "in": "query", + "description": "Include tags in the share", + "schema": { + "type": "string", + "default": "false" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Shares 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/Share" + } + } + } + } + } + } + } + } + }, + "404": { + "description": "The folder was not found or is inaccessible", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "shareapi-create-share", + "summary": "Create a share", + "tags": [ + "shareapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "path", + "in": "query", + "description": "Path of the share", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "permissions", + "in": "query", + "description": "Permissions for the share", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "shareType", + "in": "query", + "description": "Type of the share", + "schema": { + "type": "integer", + "format": "int64", + "default": 1 + } + }, + { + "name": "shareWith", + "in": "query", + "description": "The entity this should be shared with", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "publicUpload", + "in": "query", + "description": "If public uploading is allowed", + "schema": { + "type": "string", + "default": "false" + } + }, + { + "name": "password", + "in": "query", + "description": "Password for the share", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sendPasswordByTalk", + "in": "query", + "description": "Send the password for the share over Talk", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "expireDate", + "in": "query", + "description": "Expiry date of the share", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "note", + "in": "query", + "description": "Note for the share", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "label", + "in": "query", + "description": "Label for the share (only used in link and email)", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "attributes", + "in": "query", + "description": "Additional attributes for the share", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Share created", + "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/Share" + } + } + } + } + } + } + } + }, + "400": { + "description": "Unknown share type", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "403": { + "description": "Creating the share is not allowed", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "404": { + "description": "Creating the share failed", + "content": { + "text/plain": { + "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/files_sharing/api/v1/shares/inherited": { + "get": { + "operationId": "shareapi-get-inherited-shares", + "summary": "Get all shares relative to a file, including parent folders shares rights", + "tags": [ + "shareapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "path", + "in": "query", + "description": "Path all shares will be relative to", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Shares 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/Share" + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "404": { + "description": "The given path is invalid", + "content": { + "text/plain": { + "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/files_sharing/api/v1/shares/pending": { + "get": { + "operationId": "shareapi-pending-shares", + "summary": "Get all shares that are still pending", + "tags": [ + "shareapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/Share" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/files_sharing/api/v1/shares/{id}": { + "get": { + "operationId": "shareapi-get-share", + "summary": "Get a specific share by id", + "tags": [ + "shareapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "include_tags", + "in": "query", + "description": "Include tags in the share", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "id", + "in": "path", + "description": "ID of the share", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Share 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/Share" + } + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "shareapi-update-share", + "summary": "Update a share", + "tags": [ + "shareapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "permissions", + "in": "query", + "description": "New permissions", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "password", + "in": "query", + "description": "New password", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sendPasswordByTalk", + "in": "query", + "description": "New condition if the password should be send over Talk", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "publicUpload", + "in": "query", + "description": "New condition if public uploading is allowed", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "expireDate", + "in": "query", + "description": "New expiry date", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "note", + "in": "query", + "description": "New note", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "label", + "in": "query", + "description": "New label", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "hideDownload", + "in": "query", + "description": "New condition if the download should be hidden", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "attributes", + "in": "query", + "description": "New additional attributes", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "id", + "in": "path", + "description": "ID of the share", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Share 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/Share" + } + } + } + } + } + } + } + }, + "400": { + "description": "Share could not be updated because the requested changes are invalid", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to update the share", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "shareapi-delete-share", + "summary": "Delete a share", + "tags": [ + "shareapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the share", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Share 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": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to delete the share", + "content": { + "text/plain": { + "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/files_sharing/api/v1/shares/pending/{id}": { + "post": { + "operationId": "shareapi-accept-share", + "summary": "Accept a share", + "tags": [ + "shareapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the share", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Share accepted 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": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "400": { + "description": "Share could not be accepted", + "content": { + "text/plain": { + "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/files_sharing/api/v1/deletedshares": { + "get": { + "operationId": "deleted_shareapi-list", + "summary": "Get a list of all deleted shares", + "tags": [ + "deleted_shareapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/DeletedShare" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/files_sharing/api/v1/deletedshares/{id}": { + "post": { + "operationId": "deleted_shareapi-undelete", + "summary": "Undelete a deleted share", + "tags": [ + "deleted_shareapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the share", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Share undeleted 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": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "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/files_sharing/api/v1/sharees": { + "get": { + "operationId": "shareesapi-search", + "summary": "Search for sharees", + "tags": [ + "shareesapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "itemType", + "in": "query", + "description": "Limit to specific item types", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Page offset for searching", + "schema": { + "type": "integer", + "format": "int64", + "default": 1 + } + }, + { + "name": "perPage", + "in": "query", + "description": "Limit amount of search results per page", + "schema": { + "type": "integer", + "format": "int64", + "default": 200 + } + }, + { + "name": "shareType", + "in": "query", + "description": "Limit to specific share types", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "lookup", + "in": "query", + "description": "If a global lookup should be performed too", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Sharees search result 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/ShareesSearchResult" + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid search parameters", + "content": { + "text/plain": { + "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/files_sharing/api/v1/sharees_recommended": { + "get": { + "operationId": "shareesapi-find-recommended", + "summary": "Find recommended sharees", + "tags": [ + "shareesapi" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "itemType", + "in": "query", + "description": "Limit to specific item types", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shareType", + "in": "query", + "description": "Limit to specific share types", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/ShareesRecommendedResult" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/files_sharing/api/v1/remote_shares": { + "get": { + "operationId": "remote-get-shares", + "summary": "Get a list of accepted remote shares", + "tags": [ + "remote" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/RemoteShare" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending": { + "get": { + "operationId": "remote-get-open-shares", + "summary": "Get list of pending remote shares", + "tags": [ + "remote" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/RemoteShare" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/{id}": { + "post": { + "operationId": "remote-accept-share", + "summary": "Accept a remote share", + "tags": [ + "remote" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the share", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Share accepted 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": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "remote-decline-share", + "summary": "Decline a remote share", + "tags": [ + "remote" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the share", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Share declined 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": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "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/files_sharing/api/v1/remote_shares/{id}": { + "get": { + "operationId": "remote-get-share", + "summary": "Get info of a remote share", + "tags": [ + "remote" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the share", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Share 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/RemoteShare" + } + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "remote-unshare", + "summary": "Unshare a remote share", + "tags": [ + "remote" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the share", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Share unshared 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": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Share not found", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "403": { + "description": "Unsharing not possible", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "share", + "description": "Class ShareController" + }, + { + "name": "external_shares", + "description": "Class ExternalSharesController" + } + ] +} \ No newline at end of file diff --git a/apps/oauth2/openapi.json b/apps/oauth2/openapi.json new file mode 100644 index 0000000000000..57a7bee1a64b4 --- /dev/null +++ b/apps/oauth2/openapi.json @@ -0,0 +1,216 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "oauth2", + "version": "0.0.1", + "description": "Allows OAuth2 compatible authentication from other web applications.", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": [] + }, + "paths": { + "/index.php/apps/oauth2/authorize": { + "get": { + "operationId": "login_redirector-authorize", + "summary": "Authorize the user", + "tags": [ + "login_redirector" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "client_id", + "in": "query", + "description": "Client ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "in": "query", + "description": "State of the flow", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "response_type", + "in": "query", + "description": "Response type for the flow", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Client not found", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "303": { + "description": "Redirect to login URL", + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/index.php/apps/oauth2/api/v1/token": { + "post": { + "operationId": "oauth_api-get-token", + "summary": "Get a token", + "tags": [ + "oauth_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "grant_type", + "in": "query", + "description": "Token type that should be granted", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "code", + "in": "query", + "description": "Code of the flow", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "refresh_token", + "in": "query", + "description": "Refresh token", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "client_id", + "in": "query", + "description": "Client ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "client_secret", + "in": "query", + "description": "Client secret", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Token returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "access_token", + "token_type", + "expires_in", + "refresh_token", + "user_id" + ], + "properties": { + "access_token": { + "type": "string" + }, + "token_type": { + "type": "string" + }, + "expires_in": { + "type": "integer", + "format": "int64" + }, + "refresh_token": { + "type": "string" + }, + "user_id": { + "type": "string" + } + } + } + } + } + }, + "400": { + "description": "Getting token is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/apps/provisioning_api/openapi.json b/apps/provisioning_api/openapi.json new file mode 100644 index 0000000000000..70515312003b7 --- /dev/null +++ b/apps/provisioning_api/openapi.json @@ -0,0 +1,4532 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "provisioning_api", + "version": "0.0.1", + "description": "This application enables a set of APIs that external systems can use to manage users, groups and apps.", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "AppInfo": { + "type": "object", + "required": [ + "active", + "activity", + "author", + "background-jobs", + "bugs", + "category", + "collaboration", + "commands", + "default_enable", + "dependencies", + "description", + "discussion", + "documentation", + "groups", + "id", + "info", + "internal", + "level", + "licence", + "name", + "namespace", + "navigations", + "preview", + "previewAsIcon", + "public", + "remote", + "removable", + "repair-steps", + "repository", + "sabre", + "screenshot", + "settings", + "summary", + "trash", + "two-factor-providers", + "types", + "version", + "versions", + "website" + ], + "properties": { + "active": { + "type": "boolean", + "nullable": true + }, + "activity": { + "type": "object", + "nullable": true + }, + "author": { + "type": "object", + "nullable": true + }, + "background-jobs": { + "type": "object", + "nullable": true + }, + "bugs": { + "type": "object", + "nullable": true + }, + "category": { + "type": "object", + "nullable": true + }, + "collaboration": { + "type": "object", + "nullable": true + }, + "commands": { + "type": "object", + "nullable": true + }, + "default_enable": { + "type": "object", + "nullable": true + }, + "dependencies": { + "type": "object", + "nullable": true + }, + "description": { + "type": "string" + }, + "discussion": { + "type": "object", + "nullable": true + }, + "documentation": { + "type": "object", + "nullable": true + }, + "groups": { + "type": "object", + "nullable": true + }, + "id": { + "type": "string" + }, + "info": { + "type": "object", + "nullable": true + }, + "internal": { + "type": "boolean", + "nullable": true + }, + "level": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "licence": { + "type": "object", + "nullable": true + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "object", + "nullable": true + }, + "navigations": { + "type": "object", + "nullable": true + }, + "preview": { + "type": "object", + "nullable": true + }, + "previewAsIcon": { + "type": "boolean", + "nullable": true + }, + "public": { + "type": "object", + "nullable": true + }, + "remote": { + "type": "object", + "nullable": true + }, + "removable": { + "type": "boolean", + "nullable": true + }, + "repair-steps": { + "type": "object", + "nullable": true + }, + "repository": { + "type": "object", + "nullable": true + }, + "sabre": { + "type": "object", + "nullable": true + }, + "screenshot": { + "type": "object", + "nullable": true + }, + "settings": { + "type": "object", + "nullable": true + }, + "summary": { + "type": "string" + }, + "trash": { + "type": "object", + "nullable": true + }, + "two-factor-providers": { + "type": "object", + "nullable": true + }, + "types": { + "type": "object", + "nullable": true + }, + "version": { + "type": "string" + }, + "versions": { + "type": "object", + "nullable": true + }, + "website": { + "type": "object", + "nullable": true + } + } + }, + "Capabilities": { + "type": "object", + "required": [ + "provisioning_api" + ], + "properties": { + "provisioning_api": { + "type": "object", + "required": [ + "version", + "AccountPropertyScopesVersion", + "AccountPropertyScopesFederatedEnabled", + "AccountPropertyScopesPublishedEnabled" + ], + "properties": { + "version": { + "type": "string" + }, + "AccountPropertyScopesVersion": { + "type": "integer", + "format": "int64" + }, + "AccountPropertyScopesFederatedEnabled": { + "type": "boolean" + }, + "AccountPropertyScopesPublishedEnabled": { + "type": "boolean" + } + } + } + } + }, + "GroupDetails": { + "type": "object", + "required": [ + "id", + "displayname", + "usercount", + "disabled", + "canAdd", + "canRemove" + ], + "properties": { + "id": { + "type": "string" + }, + "displayname": { + "type": "string" + }, + "usercount": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "disabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "canAdd": { + "type": "boolean" + }, + "canRemove": { + "type": "boolean" + } + } + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "UserDetails": { + "type": "object", + "required": [ + "additional_mail", + "additional_mailScope", + "address", + "addressScope", + "avatarScope", + "backend", + "backendCapabilities", + "biography", + "biographyScope", + "displayname", + "display-name", + "displaynameScope", + "email", + "emailScope", + "enabled", + "fediverse", + "fediverseScope", + "groups", + "headline", + "headlineScope", + "id", + "language", + "lastLogin", + "locale", + "notify_email", + "organisation", + "organisationScope", + "phone", + "phoneScope", + "profile_enabled", + "profile_enabledScope", + "quota", + "role", + "roleScope", + "storageLocation", + "subadmin", + "twitter", + "twitterScope", + "website", + "websiteScope" + ], + "properties": { + "additional_mail": { + "type": "array", + "items": { + "type": "string" + } + }, + "additional_mailScope": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "address": { + "type": "string" + }, + "addressScope": { + "type": "string", + "nullable": true + }, + "avatarScope": { + "type": "string", + "nullable": true + }, + "backend": { + "type": "string" + }, + "backendCapabilities": { + "type": "object", + "required": [ + "setDisplayName", + "setPassword" + ], + "properties": { + "setDisplayName": { + "type": "boolean" + }, + "setPassword": { + "type": "boolean" + } + } + }, + "biography": { + "type": "string" + }, + "biographyScope": { + "type": "string", + "nullable": true + }, + "displayname": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "displaynameScope": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "nullable": true + }, + "emailScope": { + "type": "string", + "nullable": true + }, + "enabled": { + "type": "boolean", + "nullable": true + }, + "fediverse": { + "type": "string", + "nullable": true + }, + "fediverseScope": { + "type": "string", + "nullable": true + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "headline": { + "type": "string" + }, + "headlineScope": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string" + }, + "language": { + "type": "string" + }, + "lastLogin": { + "type": "integer", + "format": "int64" + }, + "locale": { + "type": "string" + }, + "notify_email": { + "type": "string", + "nullable": true + }, + "organisation": { + "type": "string" + }, + "organisationScope": { + "type": "string", + "nullable": true + }, + "phone": { + "type": "string" + }, + "phoneScope": { + "type": "string", + "nullable": true + }, + "profile_enabled": { + "type": "string" + }, + "profile_enabledScope": { + "type": "string", + "nullable": true + }, + "quota": { + "type": "object", + "required": [ + "free", + "quota", + "relative", + "total", + "used" + ], + "properties": { + "free": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "quota": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "relative": { + "type": "number", + "format": "float", + "nullable": true + }, + "total": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "used": { + "type": "integer", + "format": "int64" + } + } + }, + "role": { + "type": "string" + }, + "roleScope": { + "type": "string", + "nullable": true + }, + "storageLocation": { + "type": "string", + "nullable": true + }, + "subadmin": { + "type": "array", + "items": { + "type": "string" + } + }, + "twitter": { + "type": "string" + }, + "twitterScope": { + "type": "string", + "nullable": true + }, + "website": { + "type": "string" + }, + "websiteScope": { + "type": "string", + "nullable": true + } + } + } + } + }, + "paths": { + "/ocs/v2.php/cloud/apps": { + "get": { + "operationId": "apps-get-apps", + "summary": "Get a list of installed apps", + "description": "This endpoint requires admin access", + "tags": [ + "apps" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filter for enabled or disabled apps", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "apps" + ], + "properties": { + "apps": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/apps/{app}": { + "get": { + "operationId": "apps-get-app-info", + "summary": "Get the app info for an app", + "description": "This endpoint requires admin access", + "tags": [ + "apps" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/AppInfo" + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "apps-enable", + "summary": "Enable an app", + "description": "This endpoint requires admin access", + "tags": [ + "apps" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "apps-disable", + "summary": "Disable an app", + "description": "This endpoint requires admin access", + "tags": [ + "apps" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/groups": { + "get": { + "operationId": "groups-get-groups", + "summary": "Get a list of groups", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "groups-add-group", + "summary": "Create a new group", + "description": "This endpoint requires admin access", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupid", + "in": "query", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "displayname", + "in": "query", + "description": "Display name of the group", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/groups/details": { + "get": { + "operationId": "groups-get-groups-details", + "summary": "Get a list of groups details", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupDetails" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/groups/{groupId}/users": { + "get": { + "operationId": "groups-get-group-users", + "summary": "Get a list of users in the specified group", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "User IDs 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": [ + "users" + ], + "properties": { + "users": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Group not found", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to get users in the group", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/groups/{groupId}/users/details": { + "get": { + "operationId": "groups-get-group-users-details", + "summary": "Get a list of users details in the specified group", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "users" + ], + "properties": { + "users": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserDetails" + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + ] + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/groups/{groupId}/subadmins": { + "get": { + "operationId": "groups-get-sub-admins-of-group", + "summary": "Get the list of user IDs that are a subadmin of the group", + "description": "This endpoint requires admin access", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/groups/{groupId}": { + "get": { + "operationId": "groups-get-group", + "summary": "Get a list of users in the specified group", + "deprecated": true, + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "users" + ], + "properties": { + "users": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "groups-update-group", + "summary": "Update a group", + "description": "This endpoint requires admin access", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "Key to update, only 'displayname'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value", + "in": "query", + "description": "New value for the key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "groups-delete-group", + "summary": "Delete a group", + "description": "This endpoint requires admin access", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users": { + "get": { + "operationId": "users-get-users", + "summary": "Get a list of users", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "users" + ], + "properties": { + "users": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "users-add-user", + "summary": "Create a new user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userid", + "in": "query", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "description": "Password of the user", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "displayName", + "in": "query", + "description": "Display name of the user", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "email", + "in": "query", + "description": "Email of the user", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "groups", + "in": "query", + "description": "Groups of the user", + "schema": { + "type": "string" + } + }, + { + "name": "subadmin", + "in": "query", + "description": "Groups where the user is subadmin", + "schema": { + "type": "string" + } + }, + { + "name": "quota", + "in": "query", + "description": "Quota of the user", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "language", + "in": "query", + "description": "Language of the user", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "manager", + "in": "query", + "description": "Manager of the user", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "User 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", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to make user subadmin", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/details": { + "get": { + "operationId": "users-get-users-details", + "summary": "Get a list of users and their details", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "users" + ], + "properties": { + "users": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserDetails" + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + ] + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/search/by-phone": { + "post": { + "operationId": "users-search-by-phone-numbers", + "summary": "Search users by their phone numbers", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "location", + "in": "query", + "description": "Location of the phone number (for country code)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "description": "Phone numbers to search for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Users 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": "string" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid location", + "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": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}": { + "get": { + "operationId": "users-get-user", + "summary": "Get the details of a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/UserDetails" + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "users-edit-user", + "summary": "Update a value of the user's details", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "Key that will be updated", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value", + "in": "query", + "description": "New value for the key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "users-delete-user", + "summary": "Delete a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/user": { + "get": { + "operationId": "users-get-current-user", + "summary": "Get the details of the current user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/UserDetails" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/user/fields": { + "get": { + "operationId": "users-get-editable-fields", + "summary": "Get a list of fields that are editable for the current user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/user/fields/{userId}": { + "get": { + "operationId": "users-get-editable-fields-for-user", + "summary": "Get a list of fields that are editable for a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}/{collectionName}": { + "put": { + "operationId": "users-edit-user-multi-value", + "summary": "Update multiple values of the user's details", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "Key that will be updated", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value", + "in": "query", + "description": "New value for the key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionName", + "in": "path", + "description": "Collection to update", + "required": true, + "schema": { + "type": "string", + "pattern": "^(?!enable$|disable$)[a-zA-Z0-9_]*$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}/wipe": { + "post": { + "operationId": "users-wipe-user-devices", + "summary": "Wipe all devices of a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}/enable": { + "put": { + "operationId": "users-enable-user", + "summary": "Enable a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}/disable": { + "put": { + "operationId": "users-disable-user", + "summary": "Disable a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}/groups": { + "get": { + "operationId": "users-get-users-groups", + "summary": "Get a list of groups the user belongs to", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "users-add-to-group", + "summary": "Add a user to a group", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupid", + "in": "query", + "description": "ID of the group", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "users-remove-from-group", + "summary": "Remove a user from a group", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupid", + "in": "query", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}/subadmins": { + "get": { + "operationId": "users-get-user-sub-admin-groups", + "summary": "Get the groups a user is a subadmin of", + "description": "This endpoint requires admin access", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID if the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": "string" + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "users-add-sub-admin", + "summary": "Make a user a subadmin of a group", + "description": "This endpoint requires admin access", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupid", + "in": "query", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "users-remove-sub-admin", + "summary": "Remove a user from the subadmins of a group", + "description": "This endpoint requires admin access", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupid", + "in": "query", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}/welcome": { + "post": { + "operationId": "users-resend-welcome-message", + "summary": "Resend the welcome message", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID if the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps": { + "get": { + "operationId": "app_config-get-apps", + "summary": "Get a list of apps", + "description": "This endpoint requires admin access", + "tags": [ + "app_config" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}": { + "get": { + "operationId": "app_config-get-keys", + "summary": "Get the config keys of an app", + "description": "This endpoint requires admin access", + "tags": [ + "app_config" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Keys 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": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "App not allowed", + "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": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}/{key}": { + "get": { + "operationId": "app_config-get-value", + "summary": "Get a the config value of an app", + "description": "This endpoint requires admin access", + "tags": [ + "app_config" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "defaultValue", + "in": "query", + "description": "Default returned value if the value is empty", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "app", + "in": "path", + "description": "ID if the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "path", + "description": "Key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Value 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": [ + "data" + ], + "properties": { + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "App not allowed", + "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": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "app_config-set-value", + "summary": "Update the config value of an app", + "tags": [ + "app_config" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "value", + "in": "query", + "description": "New value for the key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "path", + "description": "Key to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Value updated 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": true + } + } + } + } + } + } + } + }, + "403": { + "description": "App or key not allowed", + "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": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "app_config-delete-key", + "summary": "Delete a config key of an app", + "description": "This endpoint requires admin access", + "tags": [ + "app_config" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "path", + "description": "Key to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Key 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": true + } + } + } + } + } + } + } + }, + "403": { + "description": "App or key not allowed", + "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": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}": { + "post": { + "operationId": "preferences-set-preference", + "summary": "Update a preference value of an app", + "tags": [ + "preferences" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "configValue", + "in": "query", + "description": "New value", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configKey", + "in": "path", + "description": "Key of the preference", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Preference updated 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": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Preference 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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "preferences-delete-preference", + "summary": "Delete a preference for an app", + "tags": [ + "preferences" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configKey", + "in": "path", + "description": "Key to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Preference 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": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Preference 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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/provisioning_api/api/v1/config/users/{appId}": { + "post": { + "operationId": "preferences-set-multiple-preferences", + "summary": "Update multiple preference values of an app", + "tags": [ + "preferences" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "configs", + "in": "query", + "description": "Key-value pairs of the preferences", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Preferences updated 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": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Preference 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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "preferences-delete-multiple-preference", + "summary": "Delete multiple preferences for an app", + "tags": [ + "preferences" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "configKeys", + "in": "query", + "description": "Keys to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Preferences 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": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Preference 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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/apps/settings/openapi.json b/apps/settings/openapi.json new file mode 100644 index 0000000000000..6d1f8a1495044 --- /dev/null +++ b/apps/settings/openapi.json @@ -0,0 +1,65 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "settings", + "version": "0.0.1", + "description": "Nextcloud settings", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": [] + }, + "paths": { + "/index.php/settings/admin/log/download": { + "get": { + "operationId": "log_settings-download", + "summary": "download logfile", + "description": "This endpoint requires admin access", + "tags": [ + "log_settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "responses": { + "200": { + "description": "", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/apps/theming/openapi.json b/apps/theming/openapi.json new file mode 100644 index 0000000000000..298ec5722d5cf --- /dev/null +++ b/apps/theming/openapi.json @@ -0,0 +1,1206 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "theming", + "version": "0.0.1", + "description": "Adjust the Nextcloud theme", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Background": { + "type": "object", + "required": [ + "backgroundImage", + "backgroundColor", + "version" + ], + "properties": { + "backgroundImage": { + "type": "string", + "nullable": true + }, + "backgroundColor": { + "type": "string" + }, + "version": { + "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": { + "type": "object", + "required": [ + "theming" + ], + "properties": { + "theming": { + "type": "object", + "required": [ + "name", + "url", + "slogan", + "color", + "color-text", + "color-element", + "color-element-bright", + "color-element-dark", + "logo", + "background", + "background-plain", + "background-default", + "logoheader", + "favicon" + ], + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "slogan": { + "type": "string" + }, + "color": { + "type": "string" + }, + "color-text": { + "type": "string" + }, + "color-element": { + "type": "string" + }, + "color-element-bright": { + "type": "string" + }, + "color-element-dark": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "background": { + "type": "string" + }, + "background-plain": { + "type": "boolean" + }, + "background-default": { + "type": "boolean" + }, + "logoheader": { + "type": "string" + }, + "favicon": { + "type": "string" + } + } + } + } + } + } + }, + "paths": { + "/index.php/apps/theming/theme/{themeId}.css": { + "get": { + "operationId": "theming-get-theme-stylesheet", + "summary": "Get the CSS stylesheet for a theme", + "tags": [ + "theming" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "plain", + "in": "query", + "description": "Let the browser decide the CSS priority", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "withCustomCss", + "in": "query", + "description": "Include custom CSS", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "themeId", + "in": "path", + "description": "ID of the theme", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stylesheet returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/css": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Theme not found", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/index.php/apps/theming/image/{key}": { + "get": { + "operationId": "theming-get-image", + "summary": "Get an image", + "tags": [ + "theming" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "useSvg", + "in": "query", + "description": "Return image as SVG", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "key", + "in": "path", + "description": "Key of the image", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Image not found", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/index.php/apps/theming/manifest/{app}": { + "get": { + "operationId": "theming-get-manifest", + "summary": "Get the manifest for an app", + "tags": [ + "theming" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "short_name", + "start_url", + "theme_color", + "background_color", + "description", + "icons", + "display" + ], + "properties": { + "name": { + "type": "string" + }, + "short_name": { + "type": "string" + }, + "start_url": { + "type": "string" + }, + "theme_color": { + "type": "string" + }, + "background_color": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icons": { + "type": "array", + "items": { + "type": "object", + "required": [ + "src", + "type", + "sizes" + ], + "properties": { + "src": { + "type": "string" + }, + "type": { + "type": "string" + }, + "sizes": { + "type": "string" + } + } + } + }, + "display": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/index.php/apps/theming/favicon/{app}": { + "get": { + "operationId": "icon-get-favicon", + "summary": "Return a 32x32 favicon as png", + "tags": [ + "icon" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string", + "default": "core" + } + } + ], + "responses": { + "200": { + "description": "Favicon returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "image/x-icon": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Favicon not found", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/index.php/apps/theming/icon/{app}": { + "get": { + "operationId": "icon-get-touch-icon", + "summary": "Return a 512x512 icon for touch devices", + "tags": [ + "icon" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string", + "default": "core" + } + } + ], + "responses": { + "200": { + "description": "Touch icon returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/x-icon": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Touch icon not found", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/index.php/apps/theming/img/{app}/{image}": { + "get": { + "operationId": "icon-get-themed-icon", + "summary": "Get a themed icon", + "tags": [ + "icon" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "image", + "in": "path", + "description": "image file name (svg required)", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + } + ], + "responses": { + "200": { + "description": "Themed icon returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "image/svg+xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Themed icon not found", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/index.php/apps/theming/background": { + "get": { + "operationId": "user_theme-get-background", + "summary": "Get the background image", + "tags": [ + "user_theme" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Background image returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + } + }, + "404": { + "description": "Background image not found", + "content": { + "text/html": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "/index.php/apps/theming/background/{type}": { + "post": { + "operationId": "user_theme-set-background", + "summary": "Set the background", + "tags": [ + "user_theme" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "value", + "in": "query", + "description": "Path of the background image", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "color", + "in": "query", + "description": "Color for the background", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "type", + "in": "path", + "description": "Type of background", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Background 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/Background" + } + } + } + } + } + } + } + }, + "400": { + "description": "Setting background 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" + } + } + } + } + } + } + } + } + } + }, + "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" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/index.php/apps/theming/background/custom": { + "delete": { + "operationId": "user_theme-delete-background", + "summary": "Delete the background", + "tags": [ + "user_theme" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/Background" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/theming/api/v1/theme/{themeId}/enable": { + "put": { + "operationId": "user_theme-enable-theme", + "summary": "Enable theme", + "tags": [ + "user_theme" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "themeId", + "in": "path", + "description": "the theme ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Theme enabled 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": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Enabling theme is not possible", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "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/theming/api/v1/theme/{themeId}": { + "delete": { + "operationId": "user_theme-disable-theme", + "summary": "Disable theme", + "tags": [ + "user_theme" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "themeId", + "in": "path", + "description": "the theme ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Theme disabled 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": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Disabling theme is not possible", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "theming", + "description": "Class ThemingController\nhandle ajax requests to update the theme" + } + ] +} \ No newline at end of file diff --git a/apps/user_status/openapi.json b/apps/user_status/openapi.json new file mode 100644 index 0000000000000..9a3b67fb2c872 --- /dev/null +++ b/apps/user_status/openapi.json @@ -0,0 +1,1154 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "user_status", + "version": "0.0.1", + "description": "User status", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Capabilities": { + "type": "object", + "required": [ + "user_status" + ], + "properties": { + "user_status": { + "type": "object", + "required": [ + "enabled", + "restore", + "supports_emoji" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "restore": { + "type": "boolean" + }, + "supports_emoji": { + "type": "boolean" + } + } + } + } + }, + "ClearAt": { + "type": "object", + "required": [ + "type", + "time" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "period", + "end-of" + ] + }, + "time": { + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "$ref": "#/components/schemas/ClearAtTimeType" + } + ] + } + } + }, + "ClearAtTimeType": { + "type": "string", + "enum": [ + "day", + "week" + ] + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "Predefined": { + "type": "object", + "required": [ + "id", + "icon", + "message", + "clearAt", + "visible" + ], + "properties": { + "id": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "message": { + "type": "string" + }, + "clearAt": { + "$ref": "#/components/schemas/ClearAt", + "nullable": true + }, + "visible": { + "type": "boolean", + "nullable": true + } + } + }, + "Private": { + "allOf": [ + { + "$ref": "#/components/schemas/Public" + }, + { + "type": "object", + "required": [ + "messageId", + "messageIsPredefined", + "statusIsUserDefined" + ], + "properties": { + "messageId": { + "type": "string", + "nullable": true + }, + "messageIsPredefined": { + "type": "boolean" + }, + "statusIsUserDefined": { + "type": "boolean" + } + } + } + ] + }, + "Public": { + "type": "object", + "required": [ + "userId", + "message", + "icon", + "clearAt", + "status" + ], + "properties": { + "userId": { + "type": "string" + }, + "message": { + "type": "string", + "nullable": true + }, + "icon": { + "type": "string", + "nullable": true + }, + "clearAt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "status": { + "type": "string" + } + } + } + } + }, + "paths": { + "/ocs/v2.php/apps/user_status/api/v1/statuses": { + "get": { + "operationId": "statuses-find-all", + "summary": "Find statuses of users", + "tags": [ + "statuses" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of statuses to find", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for finding statuses", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/Public" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/user_status/api/v1/statuses/{userId}": { + "get": { + "operationId": "statuses-find", + "summary": "Find the status of a user", + "tags": [ + "statuses" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "The status was found 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/Public" + } + } + } + } + } + } + } + }, + "404": { + "description": "The user was not found", + "content": { + "text/plain": { + "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/user_status/api/v1/user_status": { + "get": { + "operationId": "user_status-get-status", + "summary": "Get the status of the current user", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "The status was found 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/Private" + } + } + } + } + } + } + } + }, + "404": { + "description": "The user was not found", + "content": { + "text/plain": { + "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/user_status/api/v1/user_status/status": { + "put": { + "operationId": "user_status-set-status", + "summary": "Update the status type of the current user", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "statusType", + "in": "query", + "description": "The new status type", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "The status was 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/Private" + } + } + } + } + } + } + } + }, + "400": { + "description": "The status type is invalid", + "content": { + "text/plain": { + "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/user_status/api/v1/user_status/message/predefined": { + "put": { + "operationId": "user_status-set-predefined-message", + "summary": "Set the message to a predefined message for the current user", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "messageId", + "in": "query", + "description": "ID of the predefined message", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "clearAt", + "in": "query", + "description": "When the message should be cleared", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "The message was 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/Private" + } + } + } + } + } + } + } + }, + "400": { + "description": "The clearAt or message-id is invalid", + "content": { + "text/plain": { + "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/user_status/api/v1/user_status/message/custom": { + "put": { + "operationId": "user_status-set-custom-message", + "summary": "Set the message to a custom message for the current user", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "statusIcon", + "in": "query", + "description": "Icon of the status", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "message", + "in": "query", + "description": "Message of the status", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "clearAt", + "in": "query", + "description": "When the message should be cleared", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "The message was 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/Private" + } + } + } + } + } + } + } + }, + "400": { + "description": "The clearAt or icon is invalid or the message is too long", + "content": { + "text/plain": { + "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/user_status/api/v1/user_status/message": { + "delete": { + "operationId": "user_status-clear-message", + "summary": "Clear the message of the current user", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/user_status/api/v1/user_status/revert/{messageId}": { + "delete": { + "operationId": "user_status-revert-status", + "summary": "Revert the status to the previous status", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "messageId", + "in": "path", + "description": "ID of the message to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Status reverted", + "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/Private", + "nullable": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/user_status/api/v1/predefined_statuses": { + "get": { + "operationId": "predefined_status-find-all", + "summary": "Get all predefined messages", + "tags": [ + "predefined_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/Predefined" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/user_status/api/v1/heartbeat": { + "put": { + "operationId": "heartbeat-heartbeat", + "summary": "Keep the current status alive", + "tags": [ + "heartbeat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "status", + "in": "query", + "description": "Only online, away", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Status successfully updated", + "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/Private" + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid status to update", + "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": true + } + } + } + } + } + } + } + }, + "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", + "additionalProperties": true + } + } + } + } + } + } + } + }, + "204": { + "description": "User has no status to keep alive", + "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": true + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/apps/weather_status/openapi.json b/apps/weather_status/openapi.json new file mode 100644 index 0000000000000..b6110473d3747 --- /dev/null +++ b/apps/weather_status/openapi.json @@ -0,0 +1,912 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "weather_status", + "version": "0.0.1", + "description": "Weather status in your dashboard", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Capabilities": { + "type": "object", + "required": [ + "weather_status" + ], + "properties": { + "weather_status": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "Forecast": { + "type": "object", + "required": [ + "time", + "data" + ], + "properties": { + "time": { + "type": "string" + }, + "data": { + "type": "object", + "required": [ + "instant", + "next_12_hours", + "next_1_hours", + "next_6_hours" + ], + "properties": { + "instant": { + "type": "object", + "required": [ + "details" + ], + "properties": { + "details": { + "type": "object", + "required": [ + "air_pressure_at_sea_level", + "air_temperature", + "cloud_area_fraction", + "cloud_area_fraction_high", + "cloud_area_fraction_low", + "cloud_area_fraction_medium", + "dew_point_temperature", + "fog_area_fraction", + "relative_humidity", + "ultraviolet_index_clear_sky", + "wind_from_direction", + "wind_speed", + "wind_speed_of_gust" + ], + "properties": { + "air_pressure_at_sea_level": { + "type": "number", + "format": "float" + }, + "air_temperature": { + "type": "number", + "format": "float" + }, + "cloud_area_fraction": { + "type": "number", + "format": "float" + }, + "cloud_area_fraction_high": { + "type": "number", + "format": "float" + }, + "cloud_area_fraction_low": { + "type": "number", + "format": "float" + }, + "cloud_area_fraction_medium": { + "type": "number", + "format": "float" + }, + "dew_point_temperature": { + "type": "number", + "format": "float" + }, + "fog_area_fraction": { + "type": "number", + "format": "float" + }, + "relative_humidity": { + "type": "number", + "format": "float" + }, + "ultraviolet_index_clear_sky": { + "type": "number", + "format": "float" + }, + "wind_from_direction": { + "type": "number", + "format": "float" + }, + "wind_speed": { + "type": "number", + "format": "float" + }, + "wind_speed_of_gust": { + "type": "number", + "format": "float" + } + } + } + } + }, + "next_12_hours": { + "type": "object", + "required": [ + "summary", + "details" + ], + "properties": { + "summary": { + "type": "object", + "required": [ + "symbol_code" + ], + "properties": { + "symbol_code": { + "type": "string" + } + } + }, + "details": { + "type": "object", + "required": [ + "probability_of_precipitation" + ], + "properties": { + "probability_of_precipitation": { + "type": "number", + "format": "float" + } + } + } + } + }, + "next_1_hours": { + "type": "object", + "required": [ + "summary", + "details" + ], + "properties": { + "summary": { + "type": "object", + "required": [ + "symbol_code" + ], + "properties": { + "symbol_code": { + "type": "string" + } + } + }, + "details": { + "type": "object", + "required": [ + "precipitation_amount", + "precipitation_amount_max", + "precipitation_amount_min", + "probability_of_precipitation", + "probability_of_thunder" + ], + "properties": { + "precipitation_amount": { + "type": "number", + "format": "float" + }, + "precipitation_amount_max": { + "type": "number", + "format": "float" + }, + "precipitation_amount_min": { + "type": "number", + "format": "float" + }, + "probability_of_precipitation": { + "type": "number", + "format": "float" + }, + "probability_of_thunder": { + "type": "number", + "format": "float" + } + } + } + } + }, + "next_6_hours": { + "type": "object", + "required": [ + "summary", + "details" + ], + "properties": { + "summary": { + "type": "object", + "required": [ + "symbol_code" + ], + "properties": { + "symbol_code": { + "type": "string" + } + } + }, + "details": { + "type": "object", + "required": [ + "air_temperature_max", + "air_temperature_min", + "precipitation_amount", + "precipitation_amount_max", + "precipitation_amount_min", + "probability_of_precipitation" + ], + "properties": { + "air_temperature_max": { + "type": "number", + "format": "float" + }, + "air_temperature_min": { + "type": "number", + "format": "float" + }, + "precipitation_amount": { + "type": "number", + "format": "float" + }, + "precipitation_amount_max": { + "type": "number", + "format": "float" + }, + "precipitation_amount_min": { + "type": "number", + "format": "float" + }, + "probability_of_precipitation": { + "type": "number", + "format": "float" + } + } + } + } + } + } + } + } + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + } + } + }, + "paths": { + "/ocs/v2.php/apps/weather_status/api/v1/mode": { + "put": { + "operationId": "weather_status-set-mode", + "summary": "Change the weather status mode. There are currently 2 modes: - ask the browser - use the user defined address", + "tags": [ + "weather_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "mode", + "in": "query", + "description": "New mode", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "success" + ], + "properties": { + "success": { + "type": "boolean" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/weather_status/api/v1/use-personal": { + "put": { + "operationId": "weather_status-use-personal-address", + "summary": "Try to use the address set in user personal settings as weather location", + "tags": [ + "weather_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "success", + "lat", + "lon", + "address" + ], + "properties": { + "success": { + "type": "boolean" + }, + "lat": { + "type": "number", + "format": "float", + "nullable": true + }, + "lon": { + "type": "number", + "format": "float", + "nullable": true + }, + "address": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/weather_status/api/v1/location": { + "get": { + "operationId": "weather_status-get-location", + "summary": "Get stored user location", + "tags": [ + "weather_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "lat", + "lon", + "address", + "mode" + ], + "properties": { + "lat": { + "type": "number", + "format": "float" + }, + "lon": { + "type": "number", + "format": "float" + }, + "address": { + "type": "string" + }, + "mode": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "weather_status-set-location", + "summary": "Set address and resolve it to get coordinates or directly set coordinates and get address with reverse geocoding", + "tags": [ + "weather_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "address", + "in": "query", + "description": "Any approximative or exact address", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "lat", + "in": "query", + "description": "Latitude in decimal degree format", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "lon", + "in": "query", + "description": "Longitude in decimal degree format", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "success", + "lat", + "lon", + "address" + ], + "properties": { + "success": { + "type": "boolean" + }, + "lat": { + "type": "number", + "format": "float", + "nullable": true + }, + "lon": { + "type": "number", + "format": "float", + "nullable": true + }, + "address": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/weather_status/api/v1/forecast": { + "get": { + "operationId": "weather_status-get-forecast", + "summary": "Get forecast for current location", + "tags": [ + "weather_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Forecast 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/Forecast" + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Forecast 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": [ + "success" + ], + "properties": { + "success": { + "type": "boolean" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/weather_status/api/v1/favorites": { + "get": { + "operationId": "weather_status-get-favorites", + "summary": "Get favorites list", + "tags": [ + "weather_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": "string" + } + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "weather_status-set-favorites", + "summary": "Set favorites list", + "tags": [ + "weather_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "favorites", + "in": "query", + "description": "Favorite addresses", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "success" + ], + "properties": { + "success": { + "type": "boolean" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/core/openapi.json b/core/openapi.json new file mode 100644 index 0000000000000..6ffac74649950 --- /dev/null +++ b/core/openapi.json @@ -0,0 +1,4474 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "core", + "version": "0.0.1", + "description": "Core functionality of Nextcloud", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "AutocompleteResult": { + "type": "object", + "required": [ + "id", + "label", + "icon", + "source", + "status", + "subline", + "shareWithDisplayNameUnique" + ], + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "source": { + "type": "string" + }, + "status": { + "type": "string" + }, + "subline": { + "type": "string" + }, + "shareWithDisplayNameUnique": { + "type": "string" + } + } + }, + "Collection": { + "type": "object", + "required": [ + "id", + "name", + "resources" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + }, + "ContactsAction": { + "type": "object", + "required": [ + "title", + "icon", + "hyperlink", + "appId" + ], + "properties": { + "title": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "hyperlink": { + "type": "string" + }, + "appId": { + "type": "string" + } + } + }, + "LoginFlowV2": { + "type": "object", + "required": [ + "poll", + "login" + ], + "properties": { + "poll": { + "type": "object", + "required": [ + "token", + "endpoint" + ], + "properties": { + "token": { + "type": "string" + }, + "endpoint": { + "type": "string" + } + } + }, + "login": { + "type": "string" + } + } + }, + "LoginFlowV2Credentials": { + "type": "object", + "required": [ + "server", + "loginName", + "appPassword" + ], + "properties": { + "server": { + "type": "string" + }, + "loginName": { + "type": "string" + }, + "appPassword": { + "type": "string" + } + } + }, + "NavigationEntry": { + "type": "object", + "required": [ + "id", + "order", + "href", + "icon", + "type", + "name", + "active", + "classes", + "unread" + ], + "properties": { + "id": { + "type": "string" + }, + "order": { + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "string" + } + ] + }, + "href": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "classes": { + "type": "string" + }, + "unread": { + "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" + } + } + }, + "Reference": { + "type": "object", + "required": [ + "richObjectType", + "richObject", + "openGraphObject", + "accessible" + ], + "properties": { + "richObjectType": { + "type": "string" + }, + "richObject": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "openGraphObject": { + "type": "object", + "required": [ + "id", + "name", + "description", + "thumb", + "link" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "thumb": { + "type": "string", + "nullable": true + }, + "link": { + "type": "string" + } + } + }, + "accessible": { + "type": "boolean" + } + } + }, + "ReferenceProvider": { + "type": "object", + "required": [ + "id", + "title", + "icon_url", + "order", + "search_providers_ids" + ], + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "order": { + "type": "integer", + "format": "int64" + }, + "search_providers_ids": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + }, + "Status": { + "type": "object", + "required": [ + "installed", + "maintenance", + "needsDbUpgrade", + "version", + "versionstring", + "edition", + "productname", + "extendedSupport" + ], + "properties": { + "installed": { + "type": "boolean" + }, + "maintenance": { + "type": "boolean" + }, + "needsDbUpgrade": { + "type": "boolean" + }, + "version": { + "type": "string" + }, + "versionstring": { + "type": "string" + }, + "edition": { + "type": "string" + }, + "productname": { + "type": "string" + }, + "extendedSupport": { + "type": "boolean" + } + } + }, + "UnifiedSearchProvider": { + "type": "object", + "required": [ + "id", + "name", + "order" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "order": { + "type": "integer", + "format": "int64" + } + } + }, + "UnifiedSearchResult": { + "type": "object", + "required": [ + "name", + "isPaginated", + "entries", + "cursor" + ], + "properties": { + "name": { + "type": "string" + }, + "isPaginated": { + "type": "boolean" + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedSearchResultEntry" + } + }, + "cursor": { + "nullable": true, + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "string" + } + ] + } + } + }, + "UnifiedSearchResultEntry": { + "type": "object", + "required": [ + "thumbnailUrl", + "title", + "subline", + "resourceUrl", + "icon", + "rounded", + "attributes" + ], + "properties": { + "thumbnailUrl": { + "type": "string" + }, + "title": { + "type": "string" + }, + "subline": { + "type": "string" + }, + "resourceUrl": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "rounded": { + "type": "boolean" + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "paths": { + "/index.php/core/avatar/{userId}/{size}/dark": { + "get": { + "operationId": "avatar-get-avatar-dark", + "summary": "Get the dark avatar", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "Size of the avatar", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "Avatar returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + }, + "X-NC-IsCustomAvatar": { + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Avatar not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "/index.php/core/avatar/{userId}/{size}": { + "get": { + "operationId": "avatar-get-avatar", + "summary": "Get the avatar", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "Size of the avatar", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "Avatar returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + }, + "X-NC-IsCustomAvatar": { + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Avatar not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "/index.php/core/avatar/guest/{guestName}/{size}/dark": { + "get": { + "operationId": "guest_avatar-get-avatar-dark", + "summary": "Returns a dark guest avatar image response", + "tags": [ + "guest_avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "guestName", + "in": "path", + "description": "The guest name, e.g. \"Albert\"", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "The desired avatar size, e.g. 64 for 64x64px", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Custom avatar returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "201": { + "description": "Avatar returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "500": { + "description": "" + } + } + } + }, + "/index.php/core/avatar/guest/{guestName}/{size}": { + "get": { + "operationId": "guest_avatar-get-avatar", + "summary": "Returns a guest avatar image response", + "tags": [ + "guest_avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "darkTheme", + "in": "query", + "description": "Return dark avatar", + "schema": { + "type": "integer", + "nullable": true, + "default": 0 + } + }, + { + "name": "guestName", + "in": "path", + "description": "The guest name, e.g. \"Albert\"", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "The desired avatar size, e.g. 64 for 64x64px", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Custom avatar returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "201": { + "description": "Avatar returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "500": { + "description": "" + } + } + } + }, + "/index.php/core/login/v2/poll": { + "post": { + "operationId": "client_flow_login_v2-poll", + "summary": "Poll the login flow credentials", + "tags": [ + "client_flow_login_v2" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "Token of the flow", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Login flow credentials returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginFlowV2Credentials" + } + } + } + }, + "404": { + "description": "Login flow not found or completed", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "/index.php/core/login/v2": { + "post": { + "operationId": "client_flow_login_v2-init", + "summary": "Init a login flow", + "tags": [ + "client_flow_login_v2" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginFlowV2" + } + } + } + } + } + } + }, + "/index.php/core/core/preview": { + "get": { + "operationId": "preview-get-preview-by-file-id", + "summary": "Get a preview by file ID", + "tags": [ + "preview" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "fileId", + "in": "query", + "description": "ID of the file", + "schema": { + "type": "integer", + "format": "int64", + "default": 1 + } + }, + { + "name": "x", + "in": "query", + "description": "Width of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "y", + "in": "query", + "description": "Height of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "a", + "in": "query", + "description": "Not crop the preview", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "forceIcon", + "in": "query", + "description": "Force returning an icon", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "mode", + "in": "query", + "description": "How to crop the image", + "schema": { + "type": "string", + "default": "fill" + } + } + ], + "responses": { + "200": { + "description": "Preview returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Getting preview is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "403": { + "description": "Getting preview is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "404": { + "description": "File not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "/index.php/core/core/preview.png": { + "get": { + "operationId": "preview-get-preview", + "summary": "Get a preview by file ID", + "tags": [ + "preview" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "file", + "in": "query", + "description": "Path of the file", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "x", + "in": "query", + "description": "Width of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "y", + "in": "query", + "description": "Height of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "a", + "in": "query", + "description": "Not crop the preview", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "forceIcon", + "in": "query", + "description": "Force returning an icon", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "mode", + "in": "query", + "description": "How to crop the image", + "schema": { + "type": "string", + "default": "fill" + } + } + ], + "responses": { + "200": { + "description": "Preview returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Getting preview is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "403": { + "description": "Getting preview is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "404": { + "description": "File not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "/index.php/core/core/references/preview/{referenceId}": { + "get": { + "operationId": "reference-preview", + "summary": "Get a preview for a reference", + "tags": [ + "reference" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "referenceId", + "in": "path", + "description": "the reference cache key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Preview returned", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Reference not found", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/index.php/core/core/wipe/check": { + "post": { + "operationId": "wipe-check-wipe", + "summary": "Check if the device should be wiped", + "tags": [ + "wipe" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "App password", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Device should be wiped", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "wipe" + ], + "properties": { + "wipe": { + "type": "boolean" + } + } + } + } + } + }, + "404": { + "description": "Device should not be wiped", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "/index.php/core/core/wipe/success": { + "post": { + "operationId": "wipe-wipe-done", + "summary": "Finish the wipe", + "tags": [ + "wipe" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "App password", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Wipe finished successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "404": { + "description": "Device should not be wiped", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/capabilities": { + "get": { + "operationId": "ocs-get-capabilities", + "summary": "Get the capabilities", + "tags": [ + "ocs" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "version", + "capabilities" + ], + "properties": { + "version": { + "type": "object", + "required": [ + "major", + "minor", + "micro", + "string", + "edition", + "extendedSupport" + ], + "properties": { + "major": { + "type": "integer", + "format": "int64" + }, + "minor": { + "type": "integer", + "format": "int64" + }, + "micro": { + "type": "integer", + "format": "int64" + }, + "string": { + "type": "string" + }, + "edition": { + "type": "string" + }, + "extendedSupport": { + "type": "boolean" + } + } + }, + "capabilities": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/navigation/apps": { + "get": { + "operationId": "navigation-get-apps-navigation", + "summary": "Get the apps navigation", + "tags": [ + "navigation" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "absolute", + "in": "query", + "description": "Rewrite URLs to absolute ones", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Apps navigation 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/NavigationEntry" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No apps navigation changed", + "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": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/navigation/settings": { + "get": { + "operationId": "navigation-get-settings-navigation", + "summary": "Get the settings navigation", + "tags": [ + "navigation" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "absolute", + "in": "query", + "description": "Rewrite URLs to absolute ones", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Apps navigation 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/NavigationEntry" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No apps navigation changed", + "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": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/autocomplete/get": { + "get": { + "operationId": "auto_complete-get", + "summary": "Autocomplete a query", + "tags": [ + "auto_complete" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "itemType", + "in": "query", + "description": "Type of the items to search for", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "itemId", + "in": "query", + "description": "ID of the items to search for", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sorter", + "in": "query", + "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "shareTypes", + "in": "query", + "description": "Types of shares to search for", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return", + "schema": { + "type": "integer", + "format": "int64", + "default": 10 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/AutocompleteResult" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/whatsnew": { + "get": { + "operationId": "whats_new-get", + "summary": "Get the changes", + "tags": [ + "whats_new" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Changes 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": [ + "changelogURL", + "product", + "version", + "whatsNew" + ], + "properties": { + "changelogURL": { + "type": "string" + }, + "product": { + "type": "string" + }, + "version": { + "type": "string" + }, + "whatsNew": { + "type": "object", + "required": [ + "regular", + "admin" + ], + "properties": { + "regular": { + "type": "array", + "items": { + "type": "string" + } + }, + "admin": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "204": { + "description": "No changes", + "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": true + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "whats_new-dismiss", + "summary": "Dismiss the changes", + "tags": [ + "whats_new" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "version", + "in": "query", + "description": "Version to dismiss the changes for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Changes dismissed", + "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": true + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/getapppassword": { + "get": { + "operationId": "app_password-get-app-password", + "summary": "Create app password", + "tags": [ + "app_password" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "App password 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": [ + "apppassword" + ], + "properties": { + "apppassword": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Not allowed to create app password", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/apppassword/rotate": { + "post": { + "operationId": "app_password-rotate-app-password", + "summary": "Rotate app password", + "tags": [ + "app_password" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "App password 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": [ + "apppassword" + ], + "properties": { + "apppassword": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Not allowed to rotate app password", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/apppassword": { + "delete": { + "operationId": "app_password-delete-app-password", + "summary": "Delete app password", + "tags": [ + "app_password" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "App password 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": true + } + } + } + } + } + } + } + }, + "403": { + "description": "Not allowed to delete app password", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/hovercard/v1/{userId}": { + "get": { + "operationId": "hover_card-get-user", + "summary": "Get the user details for a hovercard", + "tags": [ + "hover_card" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "User details 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": [ + "userId", + "displayName", + "actions" + ], + "properties": { + "userId": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactsAction" + } + } + } + } + } + } + } + } + } + } + }, + "404": { + "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": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/collaboration/resources/collections/search/{filter}": { + "get": { + "operationId": "collaboration_resources-search-collections", + "summary": "Search for collections", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "filter", + "in": "path", + "description": "Filter collections", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collections 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/Collection" + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Collection 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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/collaboration/resources/collections/{collectionId}": { + "get": { + "operationId": "collaboration_resources-list-collection", + "summary": "Get a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collection 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/Collection" + } + } + } + } + } + } + } + }, + "404": { + "description": "Collection 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", + "additionalProperties": true + } + } + } + } + } + } + } + }, + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "collaboration_resources-rename-collection", + "summary": "Rename a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "collectionName", + "in": "query", + "description": "New name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collection 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/Collection" + } + } + } + } + } + } + } + }, + "404": { + "description": "Collection 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", + "additionalProperties": true + } + } + } + } + } + } + } + }, + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "collaboration_resources-add-resource", + "summary": "Add a resource to a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "resourceType", + "in": "query", + "description": "Name of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "query", + "description": "ID of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collection 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/Collection" + } + } + } + } + } + } + } + }, + "404": { + "description": "Collection not found or resource inaccessible", + "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": true + } + } + } + } + } + } + } + }, + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "collaboration_resources-remove-resource", + "summary": "Remove a resource from a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "resourceType", + "in": "query", + "description": "Name of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "query", + "description": "ID of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collection 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/Collection" + } + } + } + } + } + } + } + }, + "404": { + "description": "Collection or resource 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", + "additionalProperties": true + } + } + } + } + } + } + } + }, + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/collaboration/resources/{resourceType}/{resourceId}": { + "get": { + "operationId": "collaboration_resources-get-collections-by-resource", + "summary": "Get collections by resource", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "resourceType", + "in": "path", + "description": "Type of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "path", + "description": "ID of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collections 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/Collection" + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Resource not accessible", + "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": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/collaboration/resources/{baseResourceType}/{baseResourceId}": { + "post": { + "operationId": "collaboration_resources-create-collection-on-resource", + "summary": "Create a collection for a resource", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "baseResourceType", + "in": "path", + "description": "Type of the base resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "baseResourceId", + "in": "path", + "description": "ID of the base resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collection 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/Collection" + } + } + } + } + } + } + } + }, + "400": { + "description": "Creating collection 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", + "additionalProperties": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Resource inaccessible", + "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": true + } + } + } + } + } + } + } + }, + "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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/references/resolve": { + "get": { + "operationId": "reference_api-resolve-one", + "summary": "Resolve a reference", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "reference", + "in": "query", + "description": "Reference to resolve", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "references" + ], + "properties": { + "references": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Reference", + "nullable": true + } + } + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "reference_api-resolve", + "summary": "Resolve multiple references", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "references", + "in": "query", + "description": "References to resolve", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum amount of references to resolve", + "schema": { + "type": "integer", + "format": "int64", + "default": 1 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "references" + ], + "properties": { + "references": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Reference" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/references/extract": { + "post": { + "operationId": "reference_api-extract", + "summary": "Extract references from a text", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "text", + "in": "query", + "description": "Text to extract from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resolve", + "in": "query", + "description": "Resolve the references", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum amount of references to extract", + "schema": { + "type": "integer", + "format": "int64", + "default": 1 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "references" + ], + "properties": { + "references": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Reference", + "nullable": true + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/references/providers": { + "get": { + "operationId": "reference_api-get-providers-info", + "summary": "Get the providers", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/ReferenceProvider" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/references/provider/{providerId}": { + "put": { + "operationId": "reference_api-touch-provider", + "summary": "Touch a provider", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "timestamp", + "in": "query", + "description": "Timestamp of the last usage", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "providerId", + "in": "path", + "description": "ID of the provider", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "success" + ], + "properties": { + "success": { + "type": "boolean" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/profile/{targetUserId}": { + "put": { + "operationId": "profile_api-set-visibility", + "summary": "Update the visiblity of a parameter", + "tags": [ + "profile_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "paramId", + "in": "query", + "description": "ID of the parameter", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "visibility", + "in": "query", + "description": "New visibility", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "targetUserId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Visibility updated 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": true + } + } + } + } + } + } + } + }, + "400": { + "description": "Updating visibility is not possible", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "403": { + "description": "Not allowed to edit other users visibility", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "text/plain": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/search/providers": { + "get": { + "operationId": "unified_search-get-providers", + "summary": "Get the providers for unified search", + "tags": [ + "unified_search" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "from", + "in": "query", + "description": "the url the user is currently at", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/UnifiedSearchProvider" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/search/providers/{providerId}/search": { + "get": { + "operationId": "unified_search-search", + "summary": "Search", + "tags": [ + "unified_search" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "term", + "in": "query", + "description": "Term to search", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Order of entries", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum amount of entries", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "cursor", + "in": "query", + "description": "Offset for searching", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "from", + "in": "query", + "description": "The current user URL", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "providerId", + "in": "path", + "description": "ID of the provider", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Search entries 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/UnifiedSearchResult" + } + } + } + } + } + } + } + }, + "400": { + "description": "Searching 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", + "additionalProperties": true + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/translation/languages": { + "get": { + "operationId": "translation_api-languages", + "summary": "Get the list of supported languages", + "tags": [ + "translation_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "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": [ + "languages", + "languageDetection" + ], + "properties": { + "languages": { + "type": "array", + "items": { + "type": "object", + "required": [ + "from", + "fromLabel", + "to", + "toLabel" + ], + "properties": { + "from": { + "type": "string" + }, + "fromLabel": { + "type": "string" + }, + "to": { + "type": "string" + }, + "toLabel": { + "type": "string" + } + } + } + }, + "languageDetection": { + "type": "boolean" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/translation/translate": { + "post": { + "operationId": "translation_api-translate", + "summary": "Translate a text", + "tags": [ + "translation_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "text", + "in": "query", + "description": "Text to be translated", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromLanguage", + "in": "query", + "description": "Language to translate from", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "toLanguage", + "in": "query", + "description": "Language to translate to", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Translated text 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": [ + "text", + "from" + ], + "properties": { + "text": { + "type": "string" + }, + "from": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Language not detected or unable to translate", + "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" + }, + "from": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } + } + } + }, + "412": { + "description": "Translating 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" + }, + "from": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } + } + } + }, + "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" + }, + "from": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/status.php": { + "get": { + "operationId": "get-status", + "responses": { + "200": { + "description": "Status returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Status" + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "lost", + "description": "Class LostController\nSuccessfully changing a password will emit the post_passwordReset hook." + }, + { + "name": "avatar", + "description": "Class AvatarController" + }, + { + "name": "guest_avatar", + "description": "This controller handles guest avatar requests." + } + ] +} \ No newline at end of file