{ "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 accounts, groups and apps.", "license": { "name": "agpl" } }, "components": { "securitySchemes": { "basic_auth": { "type": "http", "scheme": "basic" }, "bearer_auth": { "type": "http", "scheme": "bearer" } }, "schemas": { "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": { "$ref": "#/components/schemas/UserDetailsScope" } }, "address": { "type": "string" }, "addressScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "avatarScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "backend": { "type": "string" }, "backendCapabilities": { "type": "object", "required": [ "setDisplayName", "setPassword" ], "properties": { "setDisplayName": { "type": "boolean" }, "setPassword": { "type": "boolean" } } }, "biography": { "type": "string" }, "biographyScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "display-name": { "type": "string" }, "displayname": { "type": "string" }, "displaynameScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "email": { "type": "string", "nullable": true }, "emailScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "enabled": { "type": "boolean" }, "fediverse": { "type": "string" }, "fediverseScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "groups": { "type": "array", "items": { "type": "string" } }, "headline": { "type": "string" }, "headlineScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "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": { "$ref": "#/components/schemas/UserDetailsScope" }, "phone": { "type": "string" }, "phoneScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "profile_enabled": { "type": "string" }, "profile_enabledScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "quota": { "$ref": "#/components/schemas/UserDetailsQuota" }, "role": { "type": "string" }, "roleScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "storageLocation": { "type": "string" }, "subadmin": { "type": "array", "items": { "type": "string" } }, "twitter": { "type": "string" }, "twitterScope": { "$ref": "#/components/schemas/UserDetailsScope" }, "website": { "type": "string" }, "websiteScope": { "$ref": "#/components/schemas/UserDetailsScope" } } }, "UserDetailsQuota": { "type": "object", "properties": { "free": { "anyOf": [ { "type": "number", "format": "double" }, { "type": "integer", "format": "int64" } ] }, "quota": { "anyOf": [ { "type": "number", "format": "double" }, { "type": "integer", "format": "int64" }, { "type": "string" } ] }, "relative": { "anyOf": [ { "type": "number", "format": "double" }, { "type": "integer", "format": "int64" } ] }, "total": { "anyOf": [ { "type": "number", "format": "double" }, { "type": "integer", "format": "int64" } ] }, "used": { "anyOf": [ { "type": "number", "format": "double" }, { "type": "integer", "format": "int64" } ] } } }, "UserDetailsScope": { "type": "string", "enum": [ "v2-private", "v2-local", "v2-federated", "v2-published", "private", "contacts", "public" ] } } }, "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": { "type": "object", "additionalProperties": { "type": "object", "nullable": true } } } } } } } } } } }, "post": { "operationId": "apps-enable", "summary": "Enable an app", "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", "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\nThis endpoint requires password confirmation", "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\nThis endpoint requires password confirmation", "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\nThis endpoint requires password confirmation", "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", "description": "This endpoint requires password confirmation", "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": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Missing permissions to get users in the group", "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}/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": { "anyOf": [ { "$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", "description": "This endpoint requires password confirmation", "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": { "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/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": { "anyOf": [ { "$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": "search", "in": "query", "description": "Text to search for", "schema": { "type": "string", "default": "" } }, { "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": { "anyOf": [ { "$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", "description": "This endpoint requires password confirmation", "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", "description": "This endpoint requires password confirmation", "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", "description": "This endpoint requires password confirmation", "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", "description": "This endpoint requires password confirmation", "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", "description": "This endpoint requires password confirmation", "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", "description": "This endpoint requires password confirmation", "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", "description": "This endpoint requires password confirmation", "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", "description": "This endpoint requires password confirmation", "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", "description": "This endpoint requires password confirmation", "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": [] }