arnovr / owncloud-provisioning-api-client
This is a client to handle the owncloud provisioning api with.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 1 061
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 2
Open Issues: 1
Requires
- php: >=5.5
- beberlei/assert: ^2.4
- guzzlehttp/guzzle: ^6.1
Requires (Dev)
- mockery/mockery: ^0.9.4
- phpunit/phpunit: ^4.8
This package is not auto-updated.
Last update: 2021-12-03 08:13:25 UTC
README
This is the repository of the owncloud provisioning api client, which gives the ability to provision owncloud users, groups and apps
It implements the following provisioning API: https://doc.owncloud.org/server/8.0/admin_manual/configuration_user/user_provisioning_api.html
Initialize Provisioning Client:
use Arnovr\OwncloudProvisioning\ApiConnection;
use Arnovr\OwncloudProvisioning\ProvisioningClient;
use Arnovr\OwncloudProvisioning\ResponseParser\XMLResponseParser;
use GuzzleHttp\Client;
$provisioningClient = new ProvisioningClient(
new ApiConnection(
new Client(),
'http://www.your-owncloud-instance.com/ocs/v1.php/cloud'
'username',
'password'
5 //timeout is optional
),
new XMLResponseParser()
);
Create owncloud user
$user = new CreateUser('username', 'password');
$provisioningClient->createUser($user);
Change Email address of a user
$user = new EditUser('usertochange@email.com');
$user->email = 'email@email.com';
$provisioningClient->editUser($user);
Possible commands:
- AddUserToGroup
- CreateGroup
- CreateUser
- DeleteGroup
- DeleteUser
- DeleteUserFromGroup
- EditUser
- FindGroups
- FindGroupsOfUser
- FindSubAdminGroupsOfUser
- FindUser
- FindUsers
- FindUsersOfGroup
- MakeUserSubAdminOfGroup
- RemoveUsersSubAdminRightsFromGroup
TODO:
- DisableApp
- EnableApp
- FindAppInfo
- FindInstalledApps