Copyright © 2013 Novell, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled "GNU Free Documentation License".
Only authenticated users are allowed to access the API. Authentication is done by sending a Basic HTTP Authorisation header.
This module allows you to manage local non-system users. You can view, edit, create or delete users. Similarly, you can view, edit, create or delete groups.
The following PolicyKit permissions are needed:
org.opensuse.yast.modules.yapi.users
org.opensuse.yast.modules.yapi.groups
View a single or several users, update, create or delete a specific user
Get the list of all users
CURL example:
curl -u <user> https://<hostname>:4984/users.xml
Result: Example
Create a new user
CURL example:
curl -u <user> -X POST --data @user_post_request.xml -H "Content-Type: text/xml" https://<hostname>:4984/users.xml
Body: Example
Result: Example
Arguments:
View details about a specific user
CURL example:
curl -u <user> https://<hostname>:4984/users/<user_name>.xml
Result: Example
Arguments:
Update attributes of a user. If attributes 'groupname' or 'grouplist' are not provided they are set to their default values.
CURL example:
curl -u <user> -X PUT --data @user_put_request.xml -H "Content-Type: text/xml" https://<hostname>:4984/users/<user_name>.xml
Body: Example
Result: Example
Arguments:
Delete the user.
CURL example:
curl -u <user> -X DELETE https://<hostname>:4984/users/<user_name>.xml
View a single or several groups, update, create or delete a specific group
Get the list of all groups
CURL example:
curl -u <user> https://<hostname>:4984/groups.xml
Result: Example
Create a new group. If adding members to that group, those must already exists. Two types of groups can be created: system and local. If created successfuly, code 201 is returned.
CURL example:
curl -u <user> -X POST --data @group_post_request.xml -H "Content-Type: text/xml" https://<hostname>:4984/groups.xml
Body: Example
Arguments:
View details about a specific group
CURL example:
curl -u <user> https://<hostname>:4984/groups/<group_name>.xml
Result: Example
Arguments:
Update attributes of a group.
CURL example:
curl -u <user> -X PUT --data @group_put_request.xml -H "Content-Type: text/xml" https://<hostname>:4984/groups/<group_name>.xml
Body: Example
Result: Example
Arguments:
Delete a group. The group must not have any members, otherwise an error will be returned.
CURL example:
curl -u <user> -X DELETE https://<hostname>:4984/groups/<group_name>.xml