diff options
author | Tom Needham <tom@owncloud.com> | 2014-12-22 13:54:50 +0000 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-12-24 22:15:20 +0100 |
commit | dc85c20b1834e0691d8f642d79028b60c94eff30 (patch) | |
tree | 036d28b2d46813f6899270579c8db1f91124b637 /apps/provisioning_api/appinfo | |
parent | 801b9e0494d90dac3d1103d7e603cdfec9fe62c7 (diff) | |
download | nextcloud-server-dc85c20b1834e0691d8f642d79028b60c94eff30.tar.gz nextcloud-server-dc85c20b1834e0691d8f642d79028b60c94eff30.zip |
Add provisioning_api app
enable unit tests for provisioning api
fix admin docu key
Diffstat (limited to 'apps/provisioning_api/appinfo')
-rw-r--r-- | apps/provisioning_api/appinfo/info.xml | 22 | ||||
-rw-r--r-- | apps/provisioning_api/appinfo/routes.php | 50 | ||||
-rw-r--r-- | apps/provisioning_api/appinfo/version | 1 |
3 files changed, 73 insertions, 0 deletions
diff --git a/apps/provisioning_api/appinfo/info.xml b/apps/provisioning_api/appinfo/info.xml new file mode 100644 index 00000000000..3f1fa745cf5 --- /dev/null +++ b/apps/provisioning_api/appinfo/info.xml @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<info> + <id>provisioning_api</id> + <name>Provisioning API</name> + <description> + This application enables a set of APIs that external systems can use to create, edit, delete and query user + attributes, query, set and remove groups, set quota and query total storage used in ownCloud. Group admin users + can also query ownCloud and perform the same functions as an admin for groups they manage. The API also enables + an admin to query for active ownCloud applications, application info, and to enable or disable an app remotely. + Once the app is enabled, http requests can be used via a Basic Auth header to perform any of the functions + listed above. More information is available in the Provisioning API documentation, including example calls + and server responses. + </description> + <licence>AGPL</licence> + <author>Tom Needham</author> + <requiremin>8</requiremin> + <shipped>true</shipped> + <default_enable/> + <documentation> + <admin>admin-provisioning-api</admin> + </documentation> +</info> diff --git a/apps/provisioning_api/appinfo/routes.php b/apps/provisioning_api/appinfo/routes.php new file mode 100644 index 00000000000..7c626501d18 --- /dev/null +++ b/apps/provisioning_api/appinfo/routes.php @@ -0,0 +1,50 @@ +<?php + +/** + * ownCloud + * + * @copyright (C) 2014 ownCloud, Inc. + * + * @author Tom <tom@owncloud.com> + * @author Jörn Friedrich Dreyer <jfd@owncloud.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ + +// Users +OCP\API::register('get', '/cloud/users', array('OCA\Provisioning_API\Users', 'getUsers'), 'provisioning_api', OC_API::ADMIN_AUTH); +OCP\API::register('post', '/cloud/users', array('OCA\Provisioning_API\Users', 'addUser'), 'provisioning_api', OC_API::ADMIN_AUTH); +OCP\API::register('get', '/cloud/users/{userid}', array('OCA\Provisioning_API\Users', 'getUser'), 'provisioning_api', OC_API::USER_AUTH); +OCP\API::register('put', '/cloud/users/{userid}', array('OCA\Provisioning_API\Users', 'editUser'), 'provisioning_api', OC_API::USER_AUTH); +OCP\API::register('delete', '/cloud/users/{userid}', array('OCA\Provisioning_API\Users', 'deleteUser'), 'provisioning_api', OC_API::SUBADMIN_AUTH); +OCP\API::register('get', '/cloud/users/{userid}/groups', array('OCA\Provisioning_API\Users', 'getUsersGroups'), 'provisioning_api', OC_API::USER_AUTH); +OCP\API::register('post', '/cloud/users/{userid}/groups', array('OCA\Provisioning_API\Users', 'addToGroup'), 'provisioning_api', OC_API::SUBADMIN_AUTH); +OCP\API::register('delete', '/cloud/users/{userid}/groups', array('OCA\Provisioning_API\Users', 'removeFromGroup'), 'provisioning_api', OC_API::SUBADMIN_AUTH); +OCP\API::register('post', '/cloud/users/{userid}/subadmins', array('OCA\Provisioning_API\Users', 'addSubAdmin'), 'provisioning_api', OC_API::ADMIN_AUTH); +OCP\API::register('delete', '/cloud/users/{userid}/subadmins', array('OCA\Provisioning_API\Users', 'removeSubAdmin'), 'provisioning_api', OC_API::ADMIN_AUTH); +OCP\API::register('get', '/cloud/users/{userid}/subadmins', array('OCA\Provisioning_API\Users', 'getUserSubAdminGroups'), 'provisioning_api', OC_API::ADMIN_AUTH); + +// Groups +OCP\API::register('get', '/cloud/groups', array('OCA\Provisioning_API\Groups', 'getGroups'), 'provisioning_api', OC_API::SUBADMIN_AUTH); +OCP\API::register('post', '/cloud/groups', array('OCA\Provisioning_API\Groups', 'addGroup'), 'provisioning_api', OC_API::SUBADMIN_AUTH); +OCP\API::register('get', '/cloud/groups/{groupid}', array('OCA\Provisioning_API\Groups', 'getGroup'), 'provisioning_api', OC_API::SUBADMIN_AUTH); +OCP\API::register('delete', '/cloud/groups/{groupid}', array('OCA\Provisioning_API\Groups', 'deleteGroup'), 'provisioning_api', OC_API::ADMIN_AUTH); +OCP\API::register('get', '/cloud/groups/{groupid}/subadmins', array('OCA\Provisioning_API\Groups', 'getSubAdminsOfGroup'), 'provisioning_api', OC_API::ADMIN_AUTH); + +// Apps +OCP\API::register('get', '/cloud/apps', array('OCA\Provisioning_API\Apps', 'getApps'), 'provisioning_api', OC_API::ADMIN_AUTH); +OCP\API::register('get', '/cloud/apps/{appid}', array('OCA\Provisioning_API\Apps', 'getAppInfo'), 'provisioning_api', OC_API::ADMIN_AUTH); +OCP\API::register('post', '/cloud/apps/{appid}', array('OCA\Provisioning_API\Apps', 'enable'), 'provisioning_api', OC_API::ADMIN_AUTH); +OCP\API::register('delete', '/cloud/apps/{appid}', array('OCA\Provisioning_API\Apps', 'disable'), 'provisioning_api', OC_API::ADMIN_AUTH); diff --git a/apps/provisioning_api/appinfo/version b/apps/provisioning_api/appinfo/version new file mode 100644 index 00000000000..3b04cfb60da --- /dev/null +++ b/apps/provisioning_api/appinfo/version @@ -0,0 +1 @@ +0.2 |