From 7365a7d5b3996e41c6f2c4885553cd43824d964c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 17 Jan 2024 16:06:41 +0100 Subject: [PATCH] fix(openapi): Regenerate OpenAPI Signed-off-by: Joas Schilling --- apps/cloud_federation_api/openapi.json | 90 +- apps/comments/openapi-full.json | 46 + apps/dashboard/openapi.json | 94 - apps/dav/openapi.json | 78 +- apps/files/openapi.json | 183 +- apps/files_external/openapi.json | 48 +- apps/files_sharing/openapi.json | 1712 ++++--- .../openapi-administration.json | 1570 +++++++ apps/provisioning_api/openapi-full.json | 4056 +++++++++++++++++ apps/provisioning_api/openapi.json | 2712 +++-------- apps/sharebymail/openapi-full.json | 110 + apps/theming/openapi.json | 178 - apps/updatenotification/openapi.json | 30 +- apps/user_status/openapi.json | 178 +- apps/weather_status/openapi.json | 58 +- core/openapi.json | 456 +- 16 files changed, 7702 insertions(+), 3897 deletions(-) create mode 100644 apps/comments/openapi-full.json create mode 100644 apps/provisioning_api/openapi-administration.json create mode 100644 apps/provisioning_api/openapi-full.json create mode 100644 apps/sharebymail/openapi-full.json diff --git a/apps/cloud_federation_api/openapi.json b/apps/cloud_federation_api/openapi.json index ca20c31d6d9b3..a1712c381c39e 100644 --- a/apps/cloud_federation_api/openapi.json +++ b/apps/cloud_federation_api/openapi.json @@ -31,6 +31,51 @@ } } }, + "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 + } + } + } + } + } + } + ] + }, + "Error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + }, "Capabilities": { "type": "object", "required": [ @@ -86,51 +131,6 @@ } } } - }, - "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 - } - } - } - } - } - } - ] } } }, diff --git a/apps/comments/openapi-full.json b/apps/comments/openapi-full.json new file mode 100644 index 0000000000000..69819515bfc72 --- /dev/null +++ b/apps/comments/openapi-full.json @@ -0,0 +1,46 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "comments-full", + "version": "0.0.1", + "description": "Files app plugin to add comments to files", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Capabilities": { + "type": "object", + "required": [ + "files" + ], + "properties": { + "files": { + "type": "object", + "required": [ + "comments" + ], + "properties": { + "comments": { + "type": "boolean" + } + } + } + } + } + } + }, + "paths": {}, + "tags": [] +} \ No newline at end of file diff --git a/apps/dashboard/openapi.json b/apps/dashboard/openapi.json index fb093d5d36f26..3ba1b89ca7ad1 100644 --- a/apps/dashboard/openapi.json +++ b/apps/dashboard/openapi.json @@ -44,78 +44,6 @@ } } }, - "Widget": { - "type": "object", - "required": [ - "id", - "title", - "order", - "icon_class", - "icon_url", - "widget_url", - "item_icons_round", - "item_api_versions", - "reload_interval" - ], - "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" - }, - "item_api_versions": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "reload_interval": { - "type": "integer", - "format": "int64" - }, - "buttons": { - "type": "array", - "items": { - "type": "object", - "required": [ - "type", - "text", - "link" - ], - "properties": { - "type": { - "type": "string" - }, - "text": { - "type": "string" - }, - "link": { - "type": "string" - } - } - } - } - } - }, "WidgetItem": { "type": "object", "required": [ @@ -146,28 +74,6 @@ "type": "string" } } - }, - "WidgetItems": { - "type": "object", - "required": [ - "items", - "emptyContentMessage", - "halfEmptyContentMessage" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WidgetItem" - } - }, - "emptyContentMessage": { - "type": "string" - }, - "halfEmptyContentMessage": { - "type": "string" - } - } } } }, diff --git a/apps/dav/openapi.json b/apps/dav/openapi.json index a0df1cedd16fd..82d41ab5bcac3 100644 --- a/apps/dav/openapi.json +++ b/apps/dav/openapi.json @@ -20,25 +20,27 @@ } }, "schemas": { - "Capabilities": { + "OCSMeta": { "type": "object", "required": [ - "dav" + "status", + "statuscode" ], "properties": { - "dav": { - "type": "object", - "required": [ - "chunking" - ], - "properties": { - "chunking": { - "type": "string" - }, - "bulkupload": { - "type": "string" - } - } + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" } } }, @@ -74,30 +76,6 @@ } ] }, - "OCSMeta": { - "type": "object", - "required": [ - "status", - "statuscode" - ], - "properties": { - "status": { - "type": "string" - }, - "statuscode": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "totalitems": { - "type": "string" - }, - "itemsperpage": { - "type": "string" - } - } - }, "OutOfOfficeData": { "allOf": [ { @@ -143,6 +121,28 @@ "type": "string" } } + }, + "Capabilities": { + "type": "object", + "required": [ + "dav" + ], + "properties": { + "dav": { + "type": "object", + "required": [ + "chunking" + ], + "properties": { + "chunking": { + "type": "string" + }, + "bulkupload": { + "type": "string" + } + } + } + } } } }, diff --git a/apps/files/openapi.json b/apps/files/openapi.json index 4df81800846e2..86a6af11c709b 100644 --- a/apps/files/openapi.json +++ b/apps/files/openapi.json @@ -20,52 +20,6 @@ } }, "schemas": { - "Capabilities": { - "type": "object", - "required": [ - "files" - ], - "properties": { - "files": { - "type": "object", - "required": [ - "bigfilechunking", - "blacklisted_files", - "directEditing" - ], - "properties": { - "bigfilechunking": { - "type": "boolean" - }, - "blacklisted_files": { - "type": "array", - "items": { - "type": "object" - } - }, - "directEditing": { - "type": "object", - "required": [ - "url", - "etag", - "supportsFileId" - ], - "properties": { - "url": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "supportsFileId": { - "type": "boolean" - } - } - } - } - } - } - }, "OCSMeta": { "type": "object", "required": [ @@ -90,62 +44,44 @@ } } }, - "Template": { + "TemplateFileCreator": { "type": "object", "required": [ - "templateType", - "templateId", - "basename", - "etag", - "fileid", - "filename", - "lastmod", - "mime", - "size", - "type", - "hasPreview", - "previewUrl" + "app", + "label", + "extension", + "iconClass", + "mimetypes", + "ratio", + "actionLabel" ], "properties": { - "templateType": { - "type": "string" - }, - "templateId": { - "type": "string" - }, - "basename": { + "app": { "type": "string" }, - "etag": { + "label": { "type": "string" }, - "fileid": { - "type": "integer", - "format": "int64" - }, - "filename": { + "extension": { "type": "string" }, - "lastmod": { - "type": "integer", - "format": "int64" + "iconClass": { + "type": "string", + "nullable": true }, - "mime": { - "type": "string" + "mimetypes": { + "type": "array", + "items": { + "type": "string" + } }, - "size": { - "type": "integer", - "format": "int64" + "ratio": { + "type": "number", + "format": "float", + "nullable": true }, - "type": { + "actionLabel": { "type": "string" - }, - "hasPreview": { - "type": "boolean" - }, - "previewUrl": { - "type": "string", - "nullable": true } } }, @@ -196,44 +132,49 @@ } } }, - "TemplateFileCreator": { + "Capabilities": { "type": "object", "required": [ - "app", - "label", - "extension", - "iconClass", - "mimetypes", - "ratio", - "actionLabel" + "files" ], "properties": { - "app": { - "type": "string" - }, - "label": { - "type": "string" - }, - "extension": { - "type": "string" - }, - "iconClass": { - "type": "string", - "nullable": true - }, - "mimetypes": { - "type": "array", - "items": { - "type": "string" + "files": { + "type": "object", + "required": [ + "bigfilechunking", + "blacklisted_files", + "directEditing" + ], + "properties": { + "bigfilechunking": { + "type": "boolean" + }, + "blacklisted_files": { + "type": "array", + "items": { + "type": "object" + } + }, + "directEditing": { + "type": "object", + "required": [ + "url", + "etag", + "supportsFileId" + ], + "properties": { + "url": { + "type": "string" + }, + "etag": { + "type": "string" + }, + "supportsFileId": { + "type": "boolean" + } + } + } } - }, - "ratio": { - "type": "number", - "format": "float", - "nullable": true - }, - "actionLabel": { - "type": "string" } } } diff --git a/apps/files_external/openapi.json b/apps/files_external/openapi.json index 73aa38b7c6f41..9144c509de381 100644 --- a/apps/files_external/openapi.json +++ b/apps/files_external/openapi.json @@ -20,6 +20,30 @@ } }, "schemas": { + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, "Mount": { "type": "object", "required": [ @@ -72,30 +96,6 @@ } } }, - "OCSMeta": { - "type": "object", - "required": [ - "status", - "statuscode" - ], - "properties": { - "status": { - "type": "string" - }, - "statuscode": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "totalitems": { - "type": "string" - }, - "itemsperpage": { - "type": "string" - } - } - }, "StorageConfig": { "type": "object", "required": [ diff --git a/apps/files_sharing/openapi.json b/apps/files_sharing/openapi.json index 6c0714d3b8af3..fe99a09e250f1 100644 --- a/apps/files_sharing/openapi.json +++ b/apps/files_sharing/openapi.json @@ -20,342 +20,68 @@ } }, "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": { + "ShareInfo": { "type": "object", "required": [ "id", - "share_type", - "uid_owner", - "displayname_owner", + "parentId", + "mtime", + "name", "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" + "size", + "type", + "etag" ], "properties": { "id": { - "type": "string" - }, - "share_type": { "type": "integer", "format": "int64" }, - "uid_owner": { - "type": "string" - }, - "displayname_owner": { - "type": "string" - }, - "permissions": { + "parentId": { "type": "integer", "format": "int64" }, - "stime": { + "mtime": { "type": "integer", "format": "int64" }, - "uid_file_owner": { - "type": "string" - }, - "displayname_file_owner": { - "type": "string" - }, - "path": { - "type": "string" - }, - "item_type": { - "type": "string" - }, - "mimetype": { + "name": { "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": { + "permissions": { "type": "integer", "format": "int64" }, - "expiration": { - "type": "string", - "nullable": true + "mimetype": { + "type": "string" }, - "share_with": { - "type": "string", - "nullable": true + "size": { + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "float" + } + ] }, - "share_with_displayname": { - "type": "string", - "nullable": true + "type": { + "type": "string" }, - "share_with_link": { - "type": "string", - "nullable": true - } - } - }, - "Lookup": { - "type": "object", - "required": [ - "value", - "verified" - ], - "properties": { - "value": { + "etag": { "type": "string" }, - "verified": { - "type": "integer", - "format": "int64" + "children": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } } } }, @@ -375,93 +101,10 @@ "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": { + "totalitems": { + "type": "string" + }, + "itemsperpage": { "type": "string" } } @@ -613,161 +256,470 @@ "type": "integer", "format": "int64" }, - "send_password_by_talk": { - "type": "boolean" + "send_password_by_talk": { + "type": "boolean" + }, + "share_type": { + "type": "integer", + "format": "int64" + }, + "share_with": { + "type": "string", + "nullable": true + }, + "share_with_avatar": { + "type": "string" + }, + "share_with_displayname": { + "type": "string" + }, + "share_with_displayname_unique": { + "type": "string", + "nullable": true + }, + "share_with_link": { + "type": "string" + }, + "status": { + "type": "object", + "required": [ + "clearAt", + "icon", + "message", + "status" + ], + "properties": { + "clearAt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "icon": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string" + } + } + }, + "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" + } + } + }, + "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 + } + } + }, + "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" + } }, - "share_type": { - "type": "integer", - "format": "int64" + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sharee" + } }, - "share_with": { - "type": "string", - "nullable": true + "lookup": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeLookup" + } }, - "share_with_avatar": { - "type": "string" + "remote_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemoteGroup" + } }, - "share_with_displayname": { - "type": "string" + "remotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemote" + } }, - "share_with_displayname_unique": { - "type": "string", - "nullable": true + "rooms": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sharee" + } }, - "share_with_link": { - "type": "string" + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeUser" + } }, - "status": { + "lookupEnabled": { + "type": "boolean" + } + } + }, + "ShareesRecommendedResult": { + "type": "object", + "required": [ + "exact", + "emails", + "groups", + "remote_groups", + "remotes", + "users" + ], + "properties": { + "exact": { "type": "object", "required": [ - "clearAt", - "icon", - "message", - "status" + "emails", + "groups", + "remote_groups", + "remotes", + "users" ], "properties": { - "clearAt": { - "type": "integer", - "format": "int64", - "nullable": true + "emails": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeEmail" + } }, - "icon": { - "type": "string", - "nullable": true + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sharee" + } }, - "message": { - "type": "string", - "nullable": true + "remote_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemoteGroup" + } }, - "status": { - "type": "string" + "remotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemote" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeUser" + } } } }, - "stime": { - "type": "integer", - "format": "int64" - }, - "storage": { - "type": "integer", - "format": "int64" - }, - "storage_id": { - "type": "string" + "emails": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeEmail" + } }, - "token": { - "type": "string", - "nullable": true + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sharee" + } }, - "uid_file_owner": { - "type": "string" + "remote_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemoteGroup" + } }, - "uid_owner": { - "type": "string" + "remotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeRemote" + } }, - "url": { - "type": "string" + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareeUser" + } } } }, - "ShareInfo": { + "RemoteShare": { "type": "object", "required": [ + "accepted", + "file_id", "id", - "parentId", + "mimetype", + "mountpoint", "mtime", "name", + "owner", + "parent", "permissions", - "mimetype", - "size", + "remote", + "remote_id", + "share_token", + "share_type", "type", - "etag" + "user" ], "properties": { - "id": { + "accepted": { + "type": "boolean" + }, + "file_id": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, - "parentId": { + "id": { "type": "integer", "format": "int64" }, + "mimetype": { + "type": "string", + "nullable": true + }, + "mountpoint": { + "type": "string" + }, "mtime": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, "name": { "type": "string" }, + "owner": { + "type": "string" + }, + "parent": { + "type": "integer", + "format": "int64", + "nullable": true + }, "permissions": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, - "mimetype": { + "remote": { "type": "string" }, - "size": { - "oneOf": [ - { - "type": "integer", - "format": "int64" - }, - { - "type": "number", - "format": "float" - } - ] - }, - "type": { + "remote_id": { "type": "string" }, - "etag": { + "share_token": { "type": "string" }, - "children": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - } - }, - "Sharee": { - "type": "object", - "required": [ - "count", - "label" - ], - "properties": { - "count": { + "share_type": { "type": "integer", - "format": "int64", + "format": "int64" + }, + "type": { + "type": "string", "nullable": true }, - "label": { + "user": { "type": "string" } } @@ -843,97 +795,24 @@ } ] }, - "ShareeLookup": { - "allOf": [ - { - "$ref": "#/components/schemas/Sharee" + "Sharee": { + "type": "object", + "required": [ + "count", + "label" + ], + "properties": { + "count": { + "type": "integer", + "format": "int64", + "nullable": true }, - { - "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" - } - } - } - ] - } - } + "label": { + "type": "string" } - ] + } }, - "ShareeRemote": { + "ShareeRemoteGroup": { "allOf": [ { "$ref": "#/components/schemas/Sharee" @@ -941,21 +820,17 @@ { "type": "object", "required": [ - "uuid", + "guid", "name", - "type", "value" ], "properties": { - "uuid": { + "guid": { "type": "string" }, "name": { "type": "string" }, - "type": { - "type": "string" - }, "value": { "allOf": [ { @@ -978,7 +853,7 @@ } ] }, - "ShareeRemoteGroup": { + "ShareeRemote": { "allOf": [ { "$ref": "#/components/schemas/Sharee" @@ -986,17 +861,21 @@ { "type": "object", "required": [ - "guid", + "uuid", "name", + "type", "value" ], "properties": { - "guid": { + "uuid": { "type": "string" }, "name": { "type": "string" }, + "type": { + "type": "string" + }, "value": { "allOf": [ { @@ -1075,228 +954,349 @@ } ] }, - "ShareeValue": { - "type": "object", - "required": [ - "shareType", - "shareWith" - ], - "properties": { - "shareType": { - "type": "integer", - "format": "int64" + "ShareeLookup": { + "allOf": [ + { + "$ref": "#/components/schemas/Sharee" }, - "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" + "extra", + "value" ], "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" + "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 + } } }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShareeUser" - } + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/ShareeValue" + }, + { + "type": "object", + "required": [ + "globalScale" + ], + "properties": { + "globalScale": { + "type": "boolean" + } + } + } + ] } } + } + ] + }, + "ShareeValue": { + "type": "object", + "required": [ + "shareType", + "shareWith" + ], + "properties": { + "shareType": { + "type": "integer", + "format": "int64" }, - "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" - } + "shareWith": { + "type": "string" + } + } + }, + "Lookup": { + "type": "object", + "required": [ + "value", + "verified" + ], + "properties": { + "value": { + "type": "string" }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShareeUser" - } + "verified": { + "type": "integer", + "format": "int64" } } }, - "ShareesSearchResult": { + "Capabilities": { "type": "object", "required": [ - "exact", - "circles", - "emails", - "groups", - "lookup", - "remote_groups", - "remotes", - "rooms", - "users", - "lookupEnabled" + "files_sharing" ], "properties": { - "exact": { + "files_sharing": { "type": "object", "required": [ - "circles", - "emails", - "groups", - "remote_groups", - "remotes", - "rooms", - "users" + "api_enabled", + "public", + "user", + "resharing", + "federation", + "sharee" ], "properties": { - "circles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShareeCircle" - } + "api_enabled": { + "type": "boolean" }, - "emails": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShareeEmail" + "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" + } } }, - "groups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Sharee" + "user": { + "type": "object", + "required": [ + "send_mail" + ], + "properties": { + "send_mail": { + "type": "boolean" + }, + "expire_date": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + } } }, - "remote_groups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShareeRemoteGroup" - } + "resharing": { + "type": "boolean" }, - "remotes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShareeRemote" + "group_sharing": { + "type": "boolean" + }, + "group": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "expire_date": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + } } }, - "rooms": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Sharee" + "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" + } + } + } } }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShareeUser" + "sharee": { + "type": "object", + "required": [ + "query_lookup_default", + "always_show_unique" + ], + "properties": { + "query_lookup_default": { + "type": "boolean" + }, + "always_show_unique": { + "type": "boolean" + } } } } - }, - "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" } } } @@ -1328,16 +1328,6 @@ "schema": { "type": "string" } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } } ], "responses": { @@ -1356,27 +1346,7 @@ "description": "Getting preview 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": {} - } - } - } - } + "schema": {} } } }, @@ -1384,27 +1354,7 @@ "description": "Getting preview is not allowed", "content": { "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } + "schema": {} } } }, @@ -1412,27 +1362,7 @@ "description": "Share or preview not found", "content": { "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } + "schema": {} } } } @@ -1506,16 +1436,6 @@ "schema": { "type": "string" } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } } ], "responses": { @@ -1534,27 +1454,7 @@ "description": "Getting preview 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": {} - } - } - } - } + "schema": {} } } }, @@ -1562,27 +1462,7 @@ "description": "Getting preview is not allowed", "content": { "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } + "schema": {} } } }, @@ -1590,27 +1470,7 @@ "description": "Share or preview not found", "content": { "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } + "schema": {} } } } @@ -2617,7 +2477,7 @@ }, "/ocs/v2.php/apps/files_sharing/api/v1/deletedshares": { "get": { - "operationId": "deleted_shareapi-list", + "operationId": "deleted_shareapi-index", "summary": "Get a list of all deleted shares", "tags": [ "deleted_shareapi" diff --git a/apps/provisioning_api/openapi-administration.json b/apps/provisioning_api/openapi-administration.json new file mode 100644 index 0000000000000..2898138b5bd0e --- /dev/null +++ b/apps/provisioning_api/openapi-administration.json @@ -0,0 +1,1570 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "provisioning_api-administration", + "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": { + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "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" + } + } + } + } + } + } + }, + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Installed apps 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": [ + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "App info 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/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "App enabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "App disabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Sub admins returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/groups": { + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Group created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/groups/{groupId}": { + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Group updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Group deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User subadmin groups returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User added as group subadmin successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User removed as group subadmin successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Apps 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" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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 is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "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 of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "path", + "description": "Key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "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 is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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": {} + } + } + } + } + } + } + }, + "403": { + "description": "App or key is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/apps/provisioning_api/openapi-full.json b/apps/provisioning_api/openapi-full.json new file mode 100644 index 0000000000000..d7fbec5569ed5 --- /dev/null +++ b/apps/provisioning_api/openapi-full.json @@ -0,0 +1,4056 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "provisioning_api-full", + "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", + "address", + "backend", + "backendCapabilities", + "biography", + "display-name", + "displayname", + "email", + "fediverse", + "groups", + "headline", + "id", + "language", + "lastLogin", + "locale", + "manager", + "notify_email", + "organisation", + "phone", + "profile_enabled", + "quota", + "role", + "subadmin", + "twitter", + "website" + ], + "properties": { + "additional_mail": { + "type": "array", + "items": { + "type": "string" + } + }, + "additional_mailScope": { + "type": "array", + "items": { + "type": "string" + } + }, + "address": { + "type": "string" + }, + "addressScope": { + "type": "string" + }, + "avatarScope": { + "type": "string" + }, + "backend": { + "type": "string" + }, + "backendCapabilities": { + "type": "object", + "required": [ + "setDisplayName", + "setPassword" + ], + "properties": { + "setDisplayName": { + "type": "boolean" + }, + "setPassword": { + "type": "boolean" + } + } + }, + "biography": { + "type": "string" + }, + "biographyScope": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "displayname": { + "type": "string" + }, + "displaynameScope": { + "type": "string" + }, + "email": { + "type": "string", + "nullable": true + }, + "emailScope": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "fediverse": { + "type": "string" + }, + "fediverseScope": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "headline": { + "type": "string" + }, + "headlineScope": { + "type": "string" + }, + "id": { + "type": "string" + }, + "language": { + "type": "string" + }, + "lastLogin": { + "type": "integer", + "format": "int64" + }, + "locale": { + "type": "string" + }, + "manager": { + "type": "string" + }, + "notify_email": { + "type": "string", + "nullable": true + }, + "organisation": { + "type": "string" + }, + "organisationScope": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "phoneScope": { + "type": "string" + }, + "profile_enabled": { + "type": "string" + }, + "profile_enabledScope": { + "type": "string" + }, + "quota": { + "$ref": "#/components/schemas/UserDetailsQuota" + }, + "role": { + "type": "string" + }, + "roleScope": { + "type": "string" + }, + "storageLocation": { + "type": "string" + }, + "subadmin": { + "type": "array", + "items": { + "type": "string" + } + }, + "twitter": { + "type": "string" + }, + "twitterScope": { + "type": "string" + }, + "website": { + "type": "string" + }, + "websiteScope": { + "type": "string" + } + } + }, + "UserDetailsQuota": { + "type": "object", + "properties": { + "free": { + "oneOf": [ + { + "type": "number", + "format": "float" + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "quota": { + "oneOf": [ + { + "type": "number", + "format": "float" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "string" + } + ] + }, + "relative": { + "oneOf": [ + { + "type": "number", + "format": "float" + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "total": { + "oneOf": [ + { + "type": "number", + "format": "float" + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "used": { + "oneOf": [ + { + "type": "number", + "format": "float" + }, + { + "type": "integer", + "format": "int64" + } + ] + } + } + } + } + }, + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Installed apps 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": [ + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "App info 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/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "App enabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "App disabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Sub admins returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Groups 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": [ + "groups" + ], + "properties": { + "groups": { + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Group 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", + "required": [ + "users" + ], + "properties": { + "users": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User subadmin groups returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User added as group subadmin successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User removed as group subadmin successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Apps 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" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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 is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "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}": { + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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": {} + } + } + } + } + } + } + }, + "403": { + "description": "App or key is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Groups 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": [ + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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": "string" + } + } + } + }, + "403": { + "description": "Missing permissions to get users in the group", + "content": { + "text/plain": { + "schema": { + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Group users 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": [ + "users" + ], + "properties": { + "users": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserDetails" + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + ] + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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", + "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": "array", + "default": [], + "items": { + "type": "string" + } + } + }, + { + "name": "subadmin[]", + "in": "query", + "description": "Groups where the user is subadmin", + "schema": { + "type": "array", + "default": [], + "items": { + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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": "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Users 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": [ + "users" + ], + "properties": { + "users": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserDetails" + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + ] + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/disabled": { + "get": { + "operationId": "users-get-disabled-users-details", + "summary": "Get the list of disabled users and their details", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Limit the amount of users returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Disabled users 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": [ + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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": {} + } + } + } + } + } + } + } + } + } + }, + "/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User 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/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User value edited successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Current user 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/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Editable fields returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Editable fields for user returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User values edited successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Wiped all user devices successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User enabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User disabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Users groups 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": [ + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User added to group successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User removed from group successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Resent welcome message successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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": {} + } + } + } + } + } + } + }, + "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": {} + } + } + } + } + } + } + } + } + }, + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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": {} + } + } + } + } + } + } + }, + "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": {} + } + } + } + } + } + } + } + } + } + }, + "/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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "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": {} + } + } + } + } + } + } + }, + "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": {} + } + } + } + } + } + } + } + } + }, + "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": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "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": {} + } + } + } + } + } + } + }, + "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": {} + } + } + } + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/apps/provisioning_api/openapi.json b/apps/provisioning_api/openapi.json index df6427f150b3f..be97238a5c2b3 100644 --- a/apps/provisioning_api/openapi.json +++ b/apps/provisioning_api/openapi.json @@ -20,233 +20,27 @@ } }, "schemas": { - "AppInfo": { + "OCSMeta": { "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" + "status", + "statuscode" ], "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": { + "status": { "type": "string" }, - "info": { - "type": "object", - "nullable": true - }, - "internal": { - "type": "boolean", - "nullable": true - }, - "level": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "licence": { - "type": "object", - "nullable": true + "statuscode": { + "type": "integer" }, - "name": { + "message": { "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": { + "totalitems": { "type": "string" }, - "trash": { - "type": "object", - "nullable": true - }, - "two-factor-providers": { - "type": "object", - "nullable": true - }, - "types": { - "type": "object", - "nullable": true - }, - "version": { + "itemsperpage": { "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" - } - } } } }, @@ -297,30 +91,6 @@ } } }, - "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": [ @@ -570,17 +340,48 @@ ] } } + }, + "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" + } + } + } + } } } }, "paths": { - "/ocs/v2.php/cloud/apps": { + "/ocs/v2.php/cloud/groups": { "get": { - "operationId": "apps-get-apps", - "summary": "Get a list of installed apps", - "description": "This endpoint requires admin access", + "operationId": "groups-get-groups", + "summary": "Get a list of groups", "tags": [ - "apps" + "groups" ], "security": [ { @@ -592,14 +393,34 @@ ], "parameters": [ { - "name": "filter", + "name": "search", "in": "query", - "description": "Filter for enabled or disabled apps", + "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", @@ -613,7 +434,7 @@ ], "responses": { "200": { - "description": "Installed apps returned", + "description": "Groups returned", "content": { "application/json": { "schema": { @@ -635,10 +456,10 @@ "data": { "type": "object", "required": [ - "apps" + "groups" ], "properties": { - "apps": { + "groups": { "type": "array", "items": { "type": "string" @@ -656,13 +477,12 @@ } } }, - "/ocs/v2.php/cloud/apps/{app}": { + "/ocs/v2.php/cloud/groups/details": { "get": { - "operationId": "apps-get-app-info", - "summary": "Get the app info for an app", - "description": "This endpoint requires admin access", + "operationId": "groups-get-groups-details", + "summary": "Get a list of groups details", "tags": [ - "apps" + "groups" ], "security": [ { @@ -674,81 +494,32 @@ ], "parameters": [ { - "name": "app", - "in": "path", - "description": "ID of the app", - "required": true, + "name": "search", + "in": "query", + "description": "Text to search for", "schema": { - "type": "string" + "type": "string", + "default": "" } }, { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "App info 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/AppInfo" - } - } - } - } - } - } + "type": "integer", + "format": "int64", + "nullable": true } - } - } - }, - "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, + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", "schema": { - "type": "string" + "type": "integer", + "format": "int64", + "default": 0 } }, { @@ -764,7 +535,7 @@ ], "responses": { "200": { - "description": "App enabled successfully", + "description": "Groups details returned", "content": { "application/json": { "schema": { @@ -783,7 +554,20 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupDetails" + } + } + } + } } } } @@ -792,13 +576,14 @@ } } } - }, - "delete": { - "operationId": "apps-disable", - "summary": "Disable an app", - "description": "This endpoint requires admin access", + } + }, + "/ocs/v2.php/cloud/groups/{groupId}/users": { + "get": { + "operationId": "groups-get-group-users", + "summary": "Get a list of users in the specified group", "tags": [ - "apps" + "groups" ], "security": [ { @@ -810,12 +595,13 @@ ], "parameters": [ { - "name": "app", + "name": "groupId", "in": "path", - "description": "ID of the app", + "description": "ID of the group", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^.+$" } }, { @@ -831,7 +617,7 @@ ], "responses": { "200": { - "description": "App disabled successfully", + "description": "User IDs returned", "content": { "application/json": { "schema": { @@ -850,21 +636,54 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "required": [ + "users" + ], + "properties": { + "users": { + "type": "array", + "items": { + "type": "string" + } + } + } + } } } } } } } + }, + "404": { + "description": "Group not found", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Missing permissions to get users in the group", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } } }, - "/ocs/v2.php/cloud/groups": { + "/ocs/v2.php/cloud/groups/{groupId}/users/details": { "get": { - "operationId": "groups-get-groups", - "summary": "Get a list of groups", + "operationId": "groups-get-group-users-details", + "summary": "Get a list of users details in the specified group", "tags": [ "groups" ], @@ -906,6 +725,16 @@ "default": 0 } }, + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -919,7 +748,7 @@ ], "responses": { "200": { - "description": "Groups returned", + "description": "Group users details returned", "content": { "application/json": { "schema": { @@ -941,13 +770,28 @@ "data": { "type": "object", "required": [ - "groups" + "users" ], "properties": { - "groups": { - "type": "array", - "items": { - "type": "string" + "users": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserDetails" + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + ] } } } @@ -960,11 +804,13 @@ } } } - }, - "post": { - "operationId": "groups-add-group", - "summary": "Create a new group", - "description": "This endpoint requires admin access", + } + }, + "/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" ], @@ -978,21 +824,13 @@ ], "parameters": [ { - "name": "groupid", - "in": "query", + "name": "groupId", + "in": "path", "description": "ID of the group", "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "displayname", - "in": "query", - "description": "Display name of the group", "schema": { "type": "string", - "default": "" + "pattern": "^.+$" } }, { @@ -1008,7 +846,7 @@ ], "responses": { "200": { - "description": "Group created successfully", + "description": "Group users returned", "content": { "application/json": { "schema": { @@ -1027,7 +865,20 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "required": [ + "users" + ], + "properties": { + "users": { + "type": "array", + "items": { + "type": "string" + } + } + } + } } } } @@ -1038,12 +889,12 @@ } } }, - "/ocs/v2.php/cloud/groups/details": { + "/ocs/v2.php/cloud/users": { "get": { - "operationId": "groups-get-groups-details", - "summary": "Get a list of groups details", + "operationId": "users-get-users", + "summary": "Get a list of users", "tags": [ - "groups" + "users" ], "security": [ { @@ -1096,7 +947,7 @@ ], "responses": { "200": { - "description": "Groups details returned", + "description": "Users returned", "content": { "application/json": { "schema": { @@ -1118,13 +969,13 @@ "data": { "type": "object", "required": [ - "groups" + "users" ], "properties": { - "groups": { + "users": { "type": "array", "items": { - "$ref": "#/components/schemas/GroupDetails" + "type": "string" } } } @@ -1137,14 +988,12 @@ } } } - } - }, - "/ocs/v2.php/cloud/groups/{groupId}/users": { - "get": { - "operationId": "groups-get-group-users", - "summary": "Get a list of users in the specified group", + }, + "post": { + "operationId": "users-add-user", + "summary": "Create a new user", "tags": [ - "groups" + "users" ], "security": [ { @@ -1156,29 +1005,106 @@ ], "parameters": [ { - "name": "groupId", - "in": "path", - "description": "ID of the group", + "name": "userid", + "in": "query", + "description": "ID of the user", "required": true, "schema": { - "type": "string", - "pattern": "^.+$" + "type": "string" } }, { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, + "name": "password", + "in": "query", + "description": "Password of the user", "schema": { - "type": "boolean", - "default": true + "type": "string", + "default": "" } - } - ], - "responses": { - "200": { - "description": "User IDs returned", + }, + { + "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": "array", + "default": [], + "items": { + "type": "string" + } + } + }, + { + "name": "subadmin[]", + "in": "query", + "description": "Groups where the user is subadmin", + "schema": { + "type": "array", + "default": [], + "items": { + "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", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "User added successfully", "content": { "application/json": { "schema": { @@ -1200,14 +1126,11 @@ "data": { "type": "object", "required": [ - "users" + "id" ], "properties": { - "users": { - "type": "array", - "items": { - "type": "string" - } + "id": { + "type": "string" } } } @@ -1218,18 +1141,8 @@ } } }, - "404": { - "description": "Group not found", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, "403": { - "description": "Missing permissions to get users in the group", + "description": "Missing permissions to make user subadmin", "content": { "text/plain": { "schema": { @@ -1241,12 +1154,12 @@ } } }, - "/ocs/v2.php/cloud/groups/{groupId}/users/details": { + "/ocs/v2.php/cloud/users/details": { "get": { - "operationId": "groups-get-group-users-details", - "summary": "Get a list of users details in the specified group", + "operationId": "users-get-users-details", + "summary": "Get a list of users and their details", "tags": [ - "groups" + "users" ], "security": [ { @@ -1286,16 +1199,6 @@ "default": 0 } }, - { - "name": "groupId", - "in": "path", - "description": "ID of the group", - "required": true, - "schema": { - "type": "string", - "pattern": "^.+$" - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -1309,7 +1212,7 @@ ], "responses": { "200": { - "description": "Group users details returned", + "description": "Users details returned", "content": { "application/json": { "schema": { @@ -1367,13 +1270,12 @@ } } }, - "/ocs/v2.php/cloud/groups/{groupId}/subadmins": { + "/ocs/v2.php/cloud/users/disabled": { "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", + "operationId": "users-get-disabled-users-details", + "summary": "Get the list of disabled users and their details", "tags": [ - "groups" + "users" ], "security": [ { @@ -1385,13 +1287,23 @@ ], "parameters": [ { - "name": "groupId", - "in": "path", - "description": "ID of the group", - "required": true, + "name": "limit", + "in": "query", + "description": "Limit the amount of users returned", "schema": { - "type": "string", - "pattern": "^.+$" + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 } }, { @@ -1407,7 +1319,7 @@ ], "responses": { "200": { - "description": "Sub admins returned", + "description": "Disabled users details returned", "content": { "application/json": { "schema": { @@ -1427,9 +1339,32 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "array", - "items": { - "type": "string" + "type": "object", + "required": [ + "users" + ], + "properties": { + "users": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserDetails" + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + ] + } + } } } } @@ -1442,13 +1377,12 @@ } } }, - "/ocs/v2.php/cloud/groups/{groupId}": { - "get": { - "operationId": "groups-get-group", - "summary": "Get a list of users in the specified group", - "deprecated": true, + "/ocs/v2.php/cloud/users/search/by-phone": { + "post": { + "operationId": "users-search-by-phone-numbers", + "summary": "Search users by their phone numbers", "tags": [ - "groups" + "users" ], "security": [ { @@ -1460,13 +1394,21 @@ ], "parameters": [ { - "name": "groupId", - "in": "path", - "description": "ID of the group", + "name": "location", + "in": "query", + "description": "Location of the phone number (for country code)", "required": true, "schema": { - "type": "string", - "pattern": "^.+$" + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "description": "Phone numbers to search for", + "required": true, + "schema": { + "type": "string" } }, { @@ -1482,7 +1424,7 @@ ], "responses": { "200": { - "description": "Group users returned", + "description": "Users returned", "content": { "application/json": { "schema": { @@ -1503,1333 +1445,19 @@ }, "data": { "type": "object", - "required": [ - "users" - ], - "properties": { - "users": { - "type": "array", - "items": { - "type": "string" - } - } + "additionalProperties": { + "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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Group updated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Group deleted successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "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", - "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": "array", - "default": [], - "items": { - "type": "string" - } - } - }, - { - "name": "subadmin[]", - "in": "query", - "description": "Groups where the user is subadmin", - "schema": { - "type": "array", - "default": [], - "items": { - "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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "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": "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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Users 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": [ - "users" - ], - "properties": { - "users": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/UserDetails" - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - } - ] - } - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/cloud/users/disabled": { - "get": { - "operationId": "users-get-disabled-users-details", - "summary": "Get the list of disabled users and their details", - "tags": [ - "users" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Limit the amount of users returned", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "offset", - "in": "query", - "description": "Offset", - "schema": { - "type": "integer", - "format": "int64", - "default": 0 - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Disabled users 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": [ - "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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "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": {} - } - } - } - } - } - } - } - } - } - }, - "/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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "User 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/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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "User value edited successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "User deleted successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Current user 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/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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Editable fields returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "type": "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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Editable fields for user returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "type": "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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "User values edited successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true + } + } + } + } + } + } } - } - ], - "responses": { - "200": { - "description": "Wiped all user devices successfully", + }, + "400": { + "description": "Invalid location", "content": { "application/json": { "schema": { @@ -2859,10 +1487,10 @@ } } }, - "/ocs/v2.php/cloud/users/{userId}/enable": { - "put": { - "operationId": "users-enable-user", - "summary": "Enable a user", + "/ocs/v2.php/cloud/users/{userId}": { + "get": { + "operationId": "users-get-user", + "summary": "Get the details of a user", "tags": [ "users" ], @@ -2897,7 +1525,7 @@ ], "responses": { "200": { - "description": "User enabled successfully", + "description": "User returned", "content": { "application/json": { "schema": { @@ -2916,7 +1544,9 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "$ref": "#/components/schemas/UserDetails" + } } } } @@ -2925,12 +1555,10 @@ } } } - } - }, - "/ocs/v2.php/cloud/users/{userId}/disable": { + }, "put": { - "operationId": "users-disable-user", - "summary": "Disable a user", + "operationId": "users-edit-user", + "summary": "Update a value of the user's details", "tags": [ "users" ], @@ -2943,6 +1571,24 @@ } ], "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", @@ -2965,7 +1611,7 @@ ], "responses": { "200": { - "description": "User disabled successfully", + "description": "User value edited successfully", "content": { "application/json": { "schema": { @@ -2993,12 +1639,10 @@ } } } - } - }, - "/ocs/v2.php/cloud/users/{userId}/groups": { - "get": { - "operationId": "users-get-users-groups", - "summary": "Get a list of groups the user belongs to", + }, + "delete": { + "operationId": "users-delete-user", + "summary": "Delete a user", "tags": [ "users" ], @@ -3033,7 +1677,7 @@ ], "responses": { "200": { - "description": "Users groups returned", + "description": "User deleted successfully", "content": { "application/json": { "schema": { @@ -3052,20 +1696,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "groups" - ], - "properties": { - "groups": { - "type": "array", - "items": { - "type": "string" - } - } - } - } + "data": {} } } } @@ -3074,10 +1705,12 @@ } } } - }, - "post": { - "operationId": "users-add-to-group", - "summary": "Add a user to a group", + } + }, + "/ocs/v2.php/cloud/user": { + "get": { + "operationId": "users-get-current-user", + "summary": "Get the details of the current user", "tags": [ "users" ], @@ -3090,24 +1723,6 @@ } ], "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", @@ -3121,7 +1736,7 @@ ], "responses": { "200": { - "description": "User added to group successfully", + "description": "Current user returned", "content": { "application/json": { "schema": { @@ -3140,7 +1755,9 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "$ref": "#/components/schemas/UserDetails" + } } } } @@ -3149,10 +1766,12 @@ } } } - }, - "delete": { - "operationId": "users-remove-from-group", - "summary": "Remove a user from a group", + } + }, + "/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" ], @@ -3165,24 +1784,6 @@ } ], "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", @@ -3196,7 +1797,7 @@ ], "responses": { "200": { - "description": "User removed from group successfully", + "description": "Editable fields returned", "content": { "application/json": { "schema": { @@ -3215,7 +1816,12 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "array", + "items": { + "type": "string" + } + } } } } @@ -3226,11 +1832,10 @@ } } }, - "/ocs/v2.php/cloud/users/{userId}/subadmins": { + "/ocs/v2.php/cloud/user/fields/{userId}": { "get": { - "operationId": "users-get-user-sub-admin-groups", - "summary": "Get the groups a user is a subadmin of", - "description": "This endpoint requires admin access", + "operationId": "users-get-editable-fields-for-user", + "summary": "Get a list of fields that are editable for a user", "tags": [ "users" ], @@ -3246,7 +1851,7 @@ { "name": "userId", "in": "path", - "description": "ID if the user", + "description": "ID of the user", "required": true, "schema": { "type": "string" @@ -3265,7 +1870,7 @@ ], "responses": { "200": { - "description": "User subadmin groups returned", + "description": "Editable fields for user returned", "content": { "application/json": { "schema": { @@ -3298,11 +1903,12 @@ } } } - }, - "post": { - "operationId": "users-add-sub-admin", - "summary": "Make a user a subadmin of a group", - "description": "This endpoint requires admin access", + } + }, + "/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" ], @@ -3316,9 +1922,18 @@ ], "parameters": [ { - "name": "groupid", + "name": "key", "in": "query", - "description": "ID of the group", + "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" @@ -3333,6 +1948,16 @@ "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", @@ -3346,7 +1971,7 @@ ], "responses": { "200": { - "description": "User added as group subadmin successfully", + "description": "User values edited successfully", "content": { "application/json": { "schema": { @@ -3374,11 +1999,12 @@ } } } - }, - "delete": { - "operationId": "users-remove-sub-admin", - "summary": "Remove a user from the subadmins of a group", - "description": "This endpoint requires admin access", + } + }, + "/ocs/v2.php/cloud/users/{userId}/wipe": { + "post": { + "operationId": "users-wipe-user-devices", + "summary": "Wipe all devices of a user", "tags": [ "users" ], @@ -3391,15 +2017,6 @@ } ], "parameters": [ - { - "name": "groupid", - "in": "query", - "description": "ID of the group", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "userId", "in": "path", @@ -3422,7 +2039,7 @@ ], "responses": { "200": { - "description": "User removed as group subadmin successfully", + "description": "Wiped all user devices successfully", "content": { "application/json": { "schema": { @@ -3452,10 +2069,10 @@ } } }, - "/ocs/v2.php/cloud/users/{userId}/welcome": { - "post": { - "operationId": "users-resend-welcome-message", - "summary": "Resend the welcome message", + "/ocs/v2.php/cloud/users/{userId}/enable": { + "put": { + "operationId": "users-enable-user", + "summary": "Enable a user", "tags": [ "users" ], @@ -3471,7 +2088,7 @@ { "name": "userId", "in": "path", - "description": "ID if the user", + "description": "ID of the user", "required": true, "schema": { "type": "string" @@ -3490,7 +2107,7 @@ ], "responses": { "200": { - "description": "Resent welcome message successfully", + "description": "User enabled successfully", "content": { "application/json": { "schema": { @@ -3520,13 +2137,12 @@ } } }, - "/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", + "/ocs/v2.php/cloud/users/{userId}/disable": { + "put": { + "operationId": "users-disable-user", + "summary": "Disable a user", "tags": [ - "app_config" + "users" ], "security": [ { @@ -3537,6 +2153,15 @@ } ], "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -3550,7 +2175,7 @@ ], "responses": { "200": { - "description": "Apps returned", + "description": "User disabled successfully", "content": { "application/json": { "schema": { @@ -3566,23 +2191,10 @@ "data" ], "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "type": "string" - } - } - } - } + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } } } @@ -3593,13 +2205,12 @@ } } }, - "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}": { + "/ocs/v2.php/cloud/users/{userId}/groups": { "get": { - "operationId": "app_config-get-keys", - "summary": "Get the config keys of an app", - "description": "This endpoint requires admin access", + "operationId": "users-get-users-groups", + "summary": "Get a list of groups the user belongs to", "tags": [ - "app_config" + "users" ], "security": [ { @@ -3611,9 +2222,9 @@ ], "parameters": [ { - "name": "app", + "name": "userId", "in": "path", - "description": "ID of the app", + "description": "ID of the user", "required": true, "schema": { "type": "string" @@ -3632,7 +2243,7 @@ ], "responses": { "200": { - "description": "Keys returned", + "description": "Users groups returned", "content": { "application/json": { "schema": { @@ -3654,10 +2265,10 @@ "data": { "type": "object", "required": [ - "data" + "groups" ], "properties": { - "data": { + "groups": { "type": "array", "items": { "type": "string" @@ -3671,63 +2282,14 @@ } } } - }, - "403": { - "description": "App is not allowed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "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", + }, + "post": { + "operationId": "users-add-to-group", + "summary": "Add a user to a group", "tags": [ - "app_config" + "users" ], "security": [ { @@ -3739,27 +2301,18 @@ ], "parameters": [ { - "name": "defaultValue", + "name": "groupid", "in": "query", - "description": "Default returned value if the value is empty", + "description": "ID of the group", "schema": { "type": "string", "default": "" } }, { - "name": "app", - "in": "path", - "description": "ID of the app", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "key", + "name": "userId", "in": "path", - "description": "Key", + "description": "ID of the user", "required": true, "schema": { "type": "string" @@ -3778,45 +2331,7 @@ ], "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 is not allowed", + "description": "User added to group successfully", "content": { "application/json": { "schema": { @@ -3835,25 +2350,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } - } + "data": {} } } } @@ -3863,11 +2360,11 @@ } } }, - "post": { - "operationId": "app_config-set-value", - "summary": "Update the config value of an app", + "delete": { + "operationId": "users-remove-from-group", + "summary": "Remove a user from a group", "tags": [ - "app_config" + "users" ], "security": [ { @@ -3879,27 +2376,18 @@ ], "parameters": [ { - "name": "value", + "name": "groupid", "in": "query", - "description": "New value for the key", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "app", - "in": "path", - "description": "ID of the app", + "description": "ID of the group", "required": true, "schema": { "type": "string" } }, { - "name": "key", + "name": "userId", "in": "path", - "description": "Key to update", + "description": "ID of the user", "required": true, "schema": { "type": "string" @@ -3918,7 +2406,7 @@ ], "responses": { "200": { - "description": "Value updated successfully", + "description": "User removed from group successfully", "content": { "application/json": { "schema": { @@ -3944,9 +2432,49 @@ } } } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}/welcome": { + "post": { + "operationId": "users-resend-welcome-message", + "summary": "Resend the welcome message", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] }, - "403": { - "description": "App or key is not allowed", + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID if the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Resent welcome message successfully", "content": { "application/json": { "schema": { @@ -3965,25 +2493,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } - } + "data": {} } } } @@ -3992,11 +2502,12 @@ } } } - }, - "delete": { - "operationId": "app_config-delete-key", - "summary": "Delete a config key of an app", - "description": "This endpoint requires admin access", + } + }, + "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}/{key}": { + "post": { + "operationId": "app_config-set-value", + "summary": "Update the config value of an app", "tags": [ "app_config" ], @@ -4009,6 +2520,15 @@ } ], "parameters": [ + { + "name": "value", + "in": "query", + "description": "New value for the key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "app", "in": "path", @@ -4021,7 +2541,7 @@ { "name": "key", "in": "path", - "description": "Key to delete", + "description": "Key to update", "required": true, "schema": { "type": "string" @@ -4040,7 +2560,7 @@ ], "responses": { "200": { - "description": "Key deleted successfully", + "description": "Value updated successfully", "content": { "application/json": { "schema": { diff --git a/apps/sharebymail/openapi-full.json b/apps/sharebymail/openapi-full.json new file mode 100644 index 0000000000000..4fe143393db79 --- /dev/null +++ b/apps/sharebymail/openapi-full.json @@ -0,0 +1,110 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "sharebymail-full", + "version": "0.0.1", + "description": "Share provider which allows you to share files by mail", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Capabilities": { + "oneOf": [ + { + "type": "object", + "required": [ + "files_sharing" + ], + "properties": { + "files_sharing": { + "type": "object", + "required": [ + "sharebymail" + ], + "properties": { + "sharebymail": { + "type": "object", + "required": [ + "enabled", + "send_password_by_mail", + "upload_files_drop", + "password", + "expire_date" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "send_password_by_mail": { + "type": "boolean" + }, + "upload_files_drop": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "password": { + "type": "object", + "required": [ + "enabled", + "enforced" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "enforced": { + "type": "boolean" + } + } + }, + "expire_date": { + "type": "object", + "required": [ + "enabled", + "enforced" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "enforced": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + { + "type": "array", + "maxLength": 0 + } + ] + } + } + }, + "paths": {}, + "tags": [] +} \ No newline at end of file diff --git a/apps/theming/openapi.json b/apps/theming/openapi.json index 439e14fcc60fc..027804806df1f 100644 --- a/apps/theming/openapi.json +++ b/apps/theming/openapi.json @@ -20,27 +20,6 @@ } }, "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": [ @@ -619,18 +598,6 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], "responses": { "200": { "description": "Background image returned", @@ -656,151 +623,6 @@ } } }, - "/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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Background set successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Background" - } - } - } - }, - "400": { - "description": "Setting background is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "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", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Background deleted successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Background" - } - } - } - } - } - } - }, "/ocs/v2.php/apps/theming/api/v1/theme/{themeId}/enable": { "put": { "operationId": "user_theme-enable-theme", diff --git a/apps/updatenotification/openapi.json b/apps/updatenotification/openapi.json index ba6065ea47c5f..32e76e10afb43 100644 --- a/apps/updatenotification/openapi.json +++ b/apps/updatenotification/openapi.json @@ -20,21 +20,6 @@ } }, "schemas": { - "App": { - "type": "object", - "required": [ - "appId", - "appName" - ], - "properties": { - "appId": { - "type": "string" - }, - "appName": { - "type": "string" - } - } - }, "OCSMeta": { "type": "object", "required": [ @@ -58,6 +43,21 @@ "type": "string" } } + }, + "App": { + "type": "object", + "required": [ + "appId", + "appName" + ], + "properties": { + "appId": { + "type": "string" + }, + "appName": { + "type": "string" + } + } } } }, diff --git a/apps/user_status/openapi.json b/apps/user_status/openapi.json index 2d76f8760ee26..5353e9fee0036 100644 --- a/apps/user_status/openapi.json +++ b/apps/user_status/openapi.json @@ -20,67 +20,6 @@ } }, "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": [ @@ -105,32 +44,34 @@ } } }, - "Predefined": { + "Public": { "type": "object", "required": [ - "id", - "icon", + "userId", "message", + "icon", "clearAt", - "visible" + "status" ], "properties": { - "id": { - "type": "string" - }, - "icon": { + "userId": { "type": "string" }, "message": { - "type": "string" + "type": "string", + "nullable": true }, - "clearAt": { - "$ref": "#/components/schemas/ClearAt", + "icon": { + "type": "string", "nullable": true }, - "visible": { - "type": "boolean", + "clearAt": { + "type": "integer", + "format": "int64", "nullable": true + }, + "status": { + "$ref": "#/components/schemas/Type" } } }, @@ -161,34 +102,32 @@ } ] }, - "Public": { + "Predefined": { "type": "object", "required": [ - "userId", - "message", + "id", "icon", + "message", "clearAt", - "status" + "visible" ], "properties": { - "userId": { + "id": { "type": "string" }, - "message": { - "type": "string", - "nullable": true - }, "icon": { - "type": "string", - "nullable": true + "type": "string" + }, + "message": { + "type": "string" }, "clearAt": { - "type": "integer", - "format": "int64", + "$ref": "#/components/schemas/ClearAt", "nullable": true }, - "status": { - "$ref": "#/components/schemas/Type" + "visible": { + "type": "boolean", + "nullable": true } } }, @@ -202,6 +141,67 @@ "offline", "invisible" ] + }, + "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" + ] + }, + "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" + } + } + } + } } } }, diff --git a/apps/weather_status/openapi.json b/apps/weather_status/openapi.json index b0356acab52a3..7bd22294848cc 100644 --- a/apps/weather_status/openapi.json +++ b/apps/weather_status/openapi.json @@ -20,22 +20,27 @@ } }, "schemas": { - "Capabilities": { + "OCSMeta": { "type": "object", "required": [ - "weather_status" + "status", + "statuscode" ], "properties": { - "weather_status": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { - "type": "boolean" - } - } + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" } } }, @@ -185,27 +190,22 @@ } } }, - "OCSMeta": { + "Capabilities": { "type": "object", "required": [ - "status", - "statuscode" + "weather_status" ], "properties": { - "status": { - "type": "string" - }, - "statuscode": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "totalitems": { - "type": "string" - }, - "itemsperpage": { - "type": "string" + "weather_status": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } } } } diff --git a/core/openapi.json b/core/openapi.json index 52e684ee729f6..87d355630dd06 100644 --- a/core/openapi.json +++ b/core/openapi.json @@ -20,114 +20,21 @@ } }, "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": { - "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": "string" - } - ] - }, - "subline": { - "type": "string" - }, - "shareWithDisplayNameUnique": { - "type": "string" - } - } - }, - "Collection": { - "type": "object", - "required": [ - "id", - "name", - "resources" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Resource" - } - } - } - }, - "ContactsAction": { + "LoginFlowV2Credentials": { "type": "object", "required": [ - "title", - "icon", - "hyperlink", - "appId" + "server", + "loginName", + "appPassword" ], "properties": { - "title": { - "type": "string" - }, - "icon": { + "server": { "type": "string" }, - "hyperlink": { + "loginName": { "type": "string" }, - "appId": { + "appPassword": { "type": "string" } } @@ -159,21 +66,26 @@ } } }, - "LoginFlowV2Credentials": { + "OCSMeta": { "type": "object", "required": [ - "server", - "loginName", - "appPassword" + "status", + "statuscode" ], "properties": { - "server": { + "status": { "type": "string" }, - "loginName": { + "statuscode": { + "type": "integer" + }, + "message": { "type": "string" }, - "appPassword": { + "totalitems": { + "type": "string" + }, + "itemsperpage": { "type": "string" } } @@ -230,82 +142,115 @@ } } }, - "OCSMeta": { + "AutocompleteResult": { "type": "object", "required": [ + "id", + "label", + "icon", + "source", "status", - "statuscode" + "subline", + "shareWithDisplayNameUnique" ], "properties": { - "status": { + "id": { "type": "string" }, - "statuscode": { - "type": "integer" + "label": { + "type": "string" }, - "message": { + "icon": { "type": "string" }, - "totalitems": { + "source": { "type": "string" }, - "itemsperpage": { + "status": { + "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": "string" + } + ] + }, + "subline": { + "type": "string" + }, + "shareWithDisplayNameUnique": { "type": "string" } } }, - "OpenGraphObject": { + "ContactsAction": { "type": "object", "required": [ - "id", - "name", - "description", - "thumb", - "link" + "title", + "icon", + "hyperlink", + "appId" ], "properties": { - "id": { + "title": { "type": "string" }, - "name": { + "icon": { "type": "string" }, - "description": { - "type": "string", - "nullable": true - }, - "thumb": { - "type": "string", - "nullable": true + "hyperlink": { + "type": "string" }, - "link": { + "appId": { "type": "string" } } }, - "Reference": { + "Collection": { "type": "object", "required": [ - "richObjectType", - "richObject", - "openGraphObject", - "accessible" + "id", + "name", + "resources" ], "properties": { - "richObjectType": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { "type": "string" }, - "richObject": { - "type": "object", - "additionalProperties": { - "type": "object" + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Resource" } - }, - "openGraphObject": { - "$ref": "#/components/schemas/OpenGraphObject" - }, - "accessible": { - "type": "boolean" } } }, @@ -341,68 +286,84 @@ } } }, - "Resource": { + "UnifiedSearchProvider": { "type": "object", "required": [ - "richObjectType", - "richObject", - "openGraphObject", - "accessible" + "id", + "appId", + "name", + "icon", + "order", + "triggers", + "filters", + "inAppSearch" ], "properties": { - "richObjectType": { + "id": { "type": "string" }, - "richObject": { + "appId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "order": { + "type": "integer", + "format": "int64" + }, + "triggers": { + "type": "array", + "items": { + "type": "string" + } + }, + "filters": { "type": "object", "additionalProperties": { - "type": "object" + "type": "string" } }, - "openGraphObject": { - "$ref": "#/components/schemas/OpenGraphObject" - }, - "accessible": { + "inAppSearch": { "type": "boolean" } } }, - "Status": { + "UnifiedSearchResult": { "type": "object", "required": [ - "installed", - "maintenance", - "needsDbUpgrade", - "version", - "versionstring", - "edition", - "productname", - "extendedSupport" + "name", + "isPaginated", + "entries", + "cursor" ], "properties": { - "installed": { - "type": "boolean" - }, - "maintenance": { - "type": "boolean" - }, - "needsDbUpgrade": { - "type": "boolean" - }, - "version": { - "type": "string" - }, - "versionstring": { + "name": { "type": "string" }, - "edition": { - "type": "string" + "isPaginated": { + "type": "boolean" }, - "productname": { - "type": "string" + "entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedSearchResultEntry" + } }, - "extendedSupport": { - "type": "boolean" + "cursor": { + "nullable": true, + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "string" + } + ] } } }, @@ -517,84 +478,68 @@ } } }, - "UnifiedSearchProvider": { + "Status": { "type": "object", "required": [ - "id", - "appId", - "name", - "icon", - "order", - "triggers", - "filters", - "inAppSearch" + "installed", + "maintenance", + "needsDbUpgrade", + "version", + "versionstring", + "edition", + "productname", + "extendedSupport" ], "properties": { - "id": { - "type": "string" + "installed": { + "type": "boolean" }, - "appId": { - "type": "string" + "maintenance": { + "type": "boolean" }, - "name": { - "type": "string" + "needsDbUpgrade": { + "type": "boolean" }, - "icon": { + "version": { "type": "string" }, - "order": { - "type": "integer", - "format": "int64" + "versionstring": { + "type": "string" }, - "triggers": { - "type": "array", - "items": { - "type": "string" - } + "edition": { + "type": "string" }, - "filters": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "productname": { + "type": "string" }, - "inAppSearch": { + "extendedSupport": { "type": "boolean" } } }, - "UnifiedSearchResult": { + "Resource": { "type": "object", "required": [ - "name", - "isPaginated", - "entries", - "cursor" + "richObjectType", + "richObject", + "openGraphObject", + "accessible" ], "properties": { - "name": { + "richObjectType": { "type": "string" }, - "isPaginated": { - "type": "boolean" - }, - "entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedSearchResultEntry" + "richObject": { + "type": "object", + "additionalProperties": { + "type": "object" } }, - "cursor": { - "nullable": true, - "oneOf": [ - { - "type": "integer", - "format": "int64" - }, - { - "type": "string" - } - ] + "openGraphObject": { + "$ref": "#/components/schemas/OpenGraphObject" + }, + "accessible": { + "type": "boolean" } } }, @@ -635,6 +580,35 @@ } } } + }, + "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" + } + } } } },