Create
Create a new user for the user that has authenticated itself. The user will be automagically linked to your domain.
https://portal.robotsindeklas.nl/API/v1/user/create
Parameters:
- username, string: the name of the new user; // TODO change this to name
- password, string: the password of the new user, should consist out of at least 6 characters
-
type, string: the type of the user. Note that as a child, you are not able to create a new user with admin rights. Currently available:
- child: the most basic account;
- teacher: teachers can create only users with the type
child
; - admin: admin users can create other admins, and has the most privileges within a domain.
Info
Get the document of a particular user.
https://portal.robotsindeklas.nl/API/v1/user/info
Parameter:
- user, string: the object id of the user you want the info of.
Lock
Lock a user. If a user is locked, it will no longer be able to log in.
https://portal.robotsindeklas.nl/API/v1/user/lock
Parameters:
- user, string: the object id of the user you want to lock;
- lock, boolean, (optional, default: false): lock (true) or unlock (false) this user.
Share
Share a user with a user or group. We define four levels of share rights:
- 0 (revoked rights): user or group will no longer have access to this user
- 1 (play rights): user or group will see this user appear under the user tab.
- 2 (edit rights): user or group is allowed to manage this user.
- 3 (admin rights): user or group is allowed to manage and further share this user.
https://portal.robotsindeklas.nl/API/v1/user/share
Parameters:
- user, string: the object id of the user you want to share;
- level, int: the share level we want to assign to the user or group with this request;
- oid, string: the object id of the user or group we want the share this user with.
Trash
Remove a user or bring it back from the trash bin.
https://portal.robotsindeklas.nl/API/v1/user/trash
Parameters:
- user, string: the object id of the user we want to trash;
- del, boolean: delete (true) or restore (false) deleted item.