diff --git a/apps/files/openapi.json b/apps/files/openapi.json index 4df81800846..f9432f6c57c 100644 --- a/apps/files/openapi.json +++ b/apps/files/openapi.json @@ -90,65 +90,6 @@ } } }, - "Template": { - "type": "object", - "required": [ - "templateType", - "templateId", - "basename", - "etag", - "fileid", - "filename", - "lastmod", - "mime", - "size", - "type", - "hasPreview", - "previewUrl" - ], - "properties": { - "templateType": { - "type": "string" - }, - "templateId": { - "type": "string" - }, - "basename": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "fileid": { - "type": "integer", - "format": "int64" - }, - "filename": { - "type": "string" - }, - "lastmod": { - "type": "integer", - "format": "int64" - }, - "mime": { - "type": "string" - }, - "size": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "string" - }, - "hasPreview": { - "type": "boolean" - }, - "previewUrl": { - "type": "string", - "nullable": true - } - } - }, "TemplateFile": { "type": "object", "required": [ diff --git a/apps/files_sharing/openapi.json b/apps/files_sharing/openapi.json index 5447218b63e..9a869feb3b2 100644 --- a/apps/files_sharing/openapi.json +++ b/apps/files_sharing/openapi.json @@ -1320,16 +1320,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": { @@ -1348,27 +1338,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": {} } } }, @@ -1376,27 +1346,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": {} } } }, @@ -1404,27 +1354,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": {} } } } @@ -1498,16 +1428,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": { @@ -1526,27 +1446,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": {} } } }, @@ -1554,27 +1454,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": {} } } }, @@ -1582,27 +1462,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": {} } } } @@ -2609,7 +2469,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 00000000000..ea8a5cdc546 --- /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": { + "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" + } + } + } + } + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + } + } + }, + "paths": { + "/ocs/v2.php/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 00000000000..d7fbec5569e --- /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 df6427f150b..e26adfc2d0a 100644 --- a/apps/provisioning_api/openapi.json +++ b/apps/provisioning_api/openapi.json @@ -20,204 +20,6 @@ } }, "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": [ @@ -574,13 +376,12 @@ } }, "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,12 +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": "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 } }, { @@ -695,7 +535,7 @@ ], "responses": { "200": { - "description": "App info returned", + "description": "Groups details returned", "content": { "application/json": { "schema": { @@ -715,7 +555,18 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/AppInfo" + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupDetails" + } + } + } } } } @@ -725,13 +576,14 @@ } } } - }, - "post": { - "operationId": "apps-enable", - "summary": "Enable 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": [ { @@ -743,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": "^.+$" } }, { @@ -764,7 +617,7 @@ ], "responses": { "200": { - "description": "App enabled successfully", + "description": "User IDs returned", "content": { "application/json": { "schema": { @@ -783,88 +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" + } + } + } } } - }, - "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": { - "get": { - "operationId": "groups-get-groups", - "summary": "Get a list of groups", + } + }, + "/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" ], @@ -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,13 +1005,90 @@ ], "parameters": [ { - "name": "groupId", - "in": "path", - "description": "ID of the group", + "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", - "pattern": "^.+$" + "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 } }, { @@ -1178,7 +1104,7 @@ ], "responses": { "200": { - "description": "User IDs returned", + "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": [ { @@ -1287,13 +1200,110 @@ } }, { - "name": "groupId", - "in": "path", - "description": "ID of the group", + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", "required": true, "schema": { - "type": "string", - "pattern": "^.+$" + "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 } }, { @@ -1309,7 +1319,7 @@ ], "responses": { "200": { - "description": "Group users details returned", + "description": "Disabled users details returned", "content": { "application/json": { "schema": { @@ -1367,13 +1377,12 @@ } } }, - "/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", + "/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": [ { @@ -1385,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" } }, { @@ -1407,7 +1424,7 @@ ], "responses": { "200": { - "description": "Sub admins returned", + "description": "Users returned", "content": { "application/json": { "schema": { @@ -1427,8 +1444,8 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "array", - "items": { + "type": "object", + "additionalProperties": { "type": "string" } } @@ -1438,17 +1455,44 @@ } } } + }, + "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/groups/{groupId}": { + "/ocs/v2.php/cloud/users/{userId}": { "get": { - "operationId": "groups-get-group", - "summary": "Get a list of users in the specified group", - "deprecated": true, + "operationId": "users-get-user", + "summary": "Get the details of a user", "tags": [ - "groups" + "users" ], "security": [ { @@ -1460,13 +1504,12 @@ ], "parameters": [ { - "name": "groupId", + "name": "userId", "in": "path", - "description": "ID of the group", + "description": "ID of the user", "required": true, "schema": { - "type": "string", - "pattern": "^.+$" + "type": "string" } }, { @@ -1482,7 +1525,7 @@ ], "responses": { "200": { - "description": "Group users returned", + "description": "User returned", "content": { "application/json": { "schema": { @@ -1502,18 +1545,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "users" - ], - "properties": { - "users": { - "type": "array", - "items": { - "type": "string" - } - } - } + "$ref": "#/components/schemas/UserDetails" } } } @@ -1525,11 +1557,10 @@ } }, "put": { - "operationId": "groups-update-group", - "summary": "Update a group", - "description": "This endpoint requires admin access", + "operationId": "users-edit-user", + "summary": "Update a value of the user's details", "tags": [ - "groups" + "users" ], "security": [ { @@ -1543,7 +1574,7 @@ { "name": "key", "in": "query", - "description": "Key to update, only 'displayname'", + "description": "Key that will be updated", "required": true, "schema": { "type": "string" @@ -1559,13 +1590,12 @@ } }, { - "name": "groupId", + "name": "userId", "in": "path", - "description": "ID of the group", + "description": "ID of the user", "required": true, "schema": { - "type": "string", - "pattern": "^.+$" + "type": "string" } }, { @@ -1581,7 +1611,7 @@ ], "responses": { "200": { - "description": "Group updated successfully", + "description": "User value edited successfully", "content": { "application/json": { "schema": { @@ -1611,11 +1641,10 @@ } }, "delete": { - "operationId": "groups-delete-group", - "summary": "Delete a group", - "description": "This endpoint requires admin access", + "operationId": "users-delete-user", + "summary": "Delete a user", "tags": [ - "groups" + "users" ], "security": [ { @@ -1627,13 +1656,12 @@ ], "parameters": [ { - "name": "groupId", + "name": "userId", "in": "path", - "description": "ID of the group", + "description": "ID of the user", "required": true, "schema": { - "type": "string", - "pattern": "^.+$" + "type": "string" } }, { @@ -1649,7 +1677,7 @@ ], "responses": { "200": { - "description": "Group deleted successfully", + "description": "User deleted successfully", "content": { "application/json": { "schema": { @@ -1679,1326 +1707,10 @@ } } }, - "/ocs/v2.php/cloud/users": { + "/ocs/v2.php/cloud/user": { "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", + "operationId": "users-get-current-user", + "summary": "Get the details of the current user", "tags": [ "users" ], @@ -3011,15 +1723,6 @@ } ], "parameters": [ - { - "name": "userId", - "in": "path", - "description": "ID of the user", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -3033,7 +1736,7 @@ ], "responses": { "200": { - "description": "Users groups returned", + "description": "Current user returned", "content": { "application/json": { "schema": { @@ -3053,18 +1756,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "groups" - ], - "properties": { - "groups": { - "type": "array", - "items": { - "type": "string" - } - } - } + "$ref": "#/components/schemas/UserDetails" } } } @@ -3074,10 +1766,12 @@ } } } - }, - "post": { - "operationId": "users-add-to-group", - "summary": "Add a user to 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" ], @@ -3090,24 +1784,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 +1797,7 @@ ], "responses": { "200": { - "description": "User added to group successfully", + "description": "Editable fields returned", "content": { "application/json": { "schema": { @@ -3140,7 +1816,12 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "array", + "items": { + "type": "string" + } + } } } } @@ -3149,10 +1830,12 @@ } } } - }, - "delete": { - "operationId": "users-remove-from-group", - "summary": "Remove a user from a group", + } + }, + "/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" ], @@ -3165,15 +1848,6 @@ } ], "parameters": [ - { - "name": "groupid", - "in": "query", - "description": "ID of the group", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "userId", "in": "path", @@ -3196,7 +1870,7 @@ ], "responses": { "200": { - "description": "User removed from group successfully", + "description": "Editable fields for user returned", "content": { "application/json": { "schema": { @@ -3215,7 +1889,12 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "array", + "items": { + "type": "string" + } + } } } } @@ -3226,11 +1905,10 @@ } } }, - "/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", + "/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" ], @@ -3244,93 +1922,40 @@ ], "parameters": [ { - "name": "userId", - "in": "path", - "description": "ID if the user", + "name": "key", + "in": "query", + "description": "Key that will be updated", "required": true, "schema": { "type": "string" } }, { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", + "name": "value", + "in": "query", + "description": "New value for the key", "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" - } - } - } - } - } - } - } + "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", + "name": "userId", + "in": "path", + "description": "ID of the user", "required": true, "schema": { "type": "string" } }, { - "name": "userId", + "name": "collectionName", "in": "path", - "description": "ID of the user", + "description": "Collection to update", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^(?!enable$|disable$)[a-zA-Z0-9_]*$" } }, { @@ -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/theming/openapi.json b/apps/theming/openapi.json index 439e14fcc60..027804806df 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/user_ldap/lib/Controller/RenewPasswordController.php b/apps/user_ldap/lib/Controller/RenewPasswordController.php index 66371cb3b49..75015f28bcd 100644 --- a/apps/user_ldap/lib/Controller/RenewPasswordController.php +++ b/apps/user_ldap/lib/Controller/RenewPasswordController.php @@ -24,6 +24,7 @@ namespace OCA\User_LDAP\Controller; use OCP\AppFramework\Controller; +use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\Http\TemplateResponse; use OCP\HintException; @@ -35,6 +36,7 @@ use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] class RenewPasswordController extends Controller { /** @var IUserManager */ private $userManager; diff --git a/vendor-bin/openapi-extractor/composer.lock b/vendor-bin/openapi-extractor/composer.lock index c7dd6e51a75..d9abadb8d2c 100644 --- a/vendor-bin/openapi-extractor/composer.lock +++ b/vendor-bin/openapi-extractor/composer.lock @@ -82,12 +82,12 @@ "source": { "type": "git", "url": "https://github.com/nextcloud/openapi-extractor.git", - "reference": "d60f9911c30b7f3b7a5de046cf3bcaaa998376f5" + "reference": "3b7b6ff9659a5f15612d4749e085bbcb83509049" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/openapi-extractor/zipball/d60f9911c30b7f3b7a5de046cf3bcaaa998376f5", - "reference": "d60f9911c30b7f3b7a5de046cf3bcaaa998376f5", + "url": "https://api.github.com/repos/nextcloud/openapi-extractor/zipball/3b7b6ff9659a5f15612d4749e085bbcb83509049", + "reference": "3b7b6ff9659a5f15612d4749e085bbcb83509049", "shasum": "" }, "require": { @@ -129,7 +129,7 @@ "source": "https://github.com/nextcloud/openapi-extractor/tree/main", "issues": "https://github.com/nextcloud/openapi-extractor/issues" }, - "time": "2024-01-08T13:18:50+00:00" + "time": "2024-01-18T14:53:21+00:00" }, { "name": "nikic/php-parser",