user (xml)

Represents a user in the system, user data is effectively immutable and removing users cannot override externally provided users
HTTP response codes as returned by the system:
200 - OK (request is ok and content returned)
201 - CREATED (request created new content, URL and id of content in the header)
204 - NO CONTENT (request is ok but no content to return)
400 - ERROR (general error in the request, probably invalid parameters or data)
401 - UNAUTHORIZED (user authentication required for this request)
403 - FORBIDDEN (authorization required, insufficient privileges, user is already authenticated)
404 - NOT FOUND (resource not found, URL is invalid in some way, id or action are invalid)
405 - METHOD NOT ALLOWED (the method is not supported for this entity type)
406 - NOT ACCEPTABLE (the data format requested is unavailable for this entity type)
500 - INTERNAL SERVER ERROR (general server failure, probably a failure in the provider)
501 - NOT IMPLEMENTED (indicates that a prefix is invalid)

Sample Entity URLs (_id=':ID:') [may not be valid]:

Entity Collection URL: GET /user (xml) (json) (form)
Response Code Details: 200 plus data; 404 if not found, 406 if format unavailable
Gets a list of all users in the system (can be limited by search but always max of 50 results), normally this only works for admin users, but can be enabled for all users with config setting 'entity.users.viewall=true'
Create Entity URL: POST /user (form)
Response Code Details: 201 plus id (EntityId); 400 if inputs invalid
Creates a user, eid is the only required field, all others are optional, id may be specified as well but one will be generated for you if you leave this out
Show Entity URL: GET /user/:ID: (xml) (json) (form)
Response Code Details: 200 plus data; 404 if not found, 406 if format unavailable
Get a single user by eid (default) or id by prefixing it with "id=" (e.g. /user/id=ERW434YIY88)
Update Entity URL: PUT /user/:ID: (form)
Response Code Details: 204; 400 if inputs invalid
Delete Entity URL: DELETE /user/:ID: (form)
Response Code Details: 204; 404 if not found

Custom Actions

current : list (GET) : [/user/current] (xml) (json) (form)
Get the current user if there is one
validatePassword : new (POST) : [/user/validatePassword]
Check if a password is valid for a user, params: 'password' (required) the password to check, 'username' (optional) the username of the user
exists : show (GET) : [/user/:ID:/exists] (xml) (json) (form)
Check if a userId exists (will check by eid and then id unless 'id=userId' is used), return 200 if exists and some failure code like 400 if not

Entity class : org.sakaiproject.entitybroker.providers.model.EntityUser

Type :: bean
Name Type Status
1) createdDatejava.util.DateRead Only
2) displayIdstringRead Only
3) displayNamestringRead/Write
4) eidstringRead/Write * required
5) emailstringRead/Write
6) firstNamestringRead/Write
7) idstringRead/Write
8) lastModifiedlongRead Only
9) lastNamestringRead/Write
10) modifiedDatejava.util.DateRead Only
11) ownerstringRead Only
12) passwordstringRead/Write
13) propsjava.util.MapRead/Write
14) referencestringRead Only
15) sortNamestringRead Only
16) typestringRead/Write
17) urlstringRead Only

Data and Request Handling

Output formats : xml, json, form
Input formats : html, xml, json
No Access Provider registered for request processing


13Resolvableorg.sakaiproject.entitybroker.entityprovider.capabilities.ResolvableThe user identifier by default is the eid (e.g. /user/aaronz), lookups can also happen using the id by prefixing it with "id=" (e.g. /user/id=ERW434YIY88)

REST:: 1.0.1 SVN: $Revision$ : $Date$