profile (xml)

Represents a user's profile. Because of the privacy settings that a user can set for individual parts of their profile, the information in the profile that is returned for a given user will be tailored based on the person requesting it.
RESTful URLs: http://microformats.org/wiki/rest/urls
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]:

Show Entity URL: GET /profile/:ID: (html) (xml) (json)
Response Code Details: 200 plus data; 404 if not found, 406 if format unavailable
(GET) Gets a user's profile. Response will be tailored to the person making the request according to the profile owners privacy settings (/profile/USER.xml).

Custom Actions

removeFriend : show (GET) : [/profile/:ID:/removeFriend] (html) (xml) (json)
image : show (GET) : [/profile/:ID:/image] (html) (xml) (json)
Retrieve the profile image for a user. Append /thumb to get the thumbnail (/profile/USER/image/thumb) if there is one. If there is no thumbnail, the main image will be returned. Append /avatar to get the avatar (/profile/USER/image/avatar) if there is one. If there is no avatar, the main image will be returned. Append /official to get the official image (/profile/USER/image/official) if there is one. If there is no official image, the default image will be returned. Optionally add the siteId URL param to allow site permissions to be checked (/profile/USER/image?siteId={siteid} or /profile/USER/image/thumb?siteId={siteid}) Returns binary of the image. Returns default image if no image exists or not allowed. Return 404 if user (or optional siteId) is invalid. Will always return an image if one exists, either by being uploaded or being a url (depending on how the system has been configured - see Profile2 sakai.properties). You can use it directly in an img tag <img src="/profile/USER/image[/thumb]" />, it should always return something. DO NOT specify any return format, ie .xml.
friendStatus : show (GET) : [/profile/:ID:/friendStatus] (html) (xml) (json)
formatted : show (GET) : [/profile/:ID:/formatted] (html) (xml) (json)
confirmFriendRequest : show (GET) : [/profile/:ID:/confirmFriendRequest] (html) (xml) (json)
unreadMessagesCount : show (GET) : [/profile/:ID:/unreadMessagesCount] (html) (xml) (json)
Return the number of unread messages for a user. Returns a failure (404) if you do not have access to view the count of the user's messages.
incomingConnectionRequests : show (GET) : [/profile/:ID:/incomingConnectionRequests] (html) (xml) (json)
Return a list of connection requests to a user. Returns an empty list if none and a failure (404) if you do not have access to view the user's connection requests, or the user is invalid.
requestFriend : show (GET) : [/profile/:ID:/requestFriend] (html) (xml) (json)
ignoreFriendRequest : show (GET) : [/profile/:ID:/ignoreFriendRequest] (html) (xml) (json)
connections : show (GET) : [/profile/:ID:/connections] (html) (xml) (json)
Return a list of connections for a user. Returns an empty list if none and a failure (404) if you do not have access to view the user's connections, or the user is invalid.

URL Redirects

1)   /profile/{id}/account ==> calculated destination
Allows for retrieval of a user's account details by redirecting to the user entity provider

Entity class : org.sakaiproject.profile2.model.UserProfile

Type :: bean
Name Type Status
1) academicProfileUrlstringRead/Write
2) birthdaystringRead/Write
3) birthdayDisplaystringRead/Write
4) businessBiographystringRead/Write
5) companyProfilesjava.util.ListRead/Write
6) coursestringRead/Write
7) dateOfBirthjava.util.DateRead/Write
8) departmentstringRead/Write
9) displayNamestringRead/Write
10) emailstringRead/Write
11) facsimilestringRead/Write
12) favouriteBooksstringRead/Write
13) favouriteMoviesstringRead/Write
14) favouriteQuotesstringRead/Write
15) favouriteTvShowsstringRead/Write
16) homepagestringRead/Write
17) homephonestringRead/Write
18) imageThumbUrlstringRead/Write
19) imageUrlstringRead/Write
20) lockedbooleanRead/Write
21) mobilephonestringRead/Write
22) nicknamestringRead/Write
23) personalSummarystringRead/Write
24) positionstringRead/Write
25) propsjava.util.MapRead/Write
26) publicationsstringRead/Write
27) roomstringRead/Write
28) schoolstringRead/Write
29) socialInfoorg.sakaiproject.profile2.model.SocialNetworkingInfoRead/Write
30) staffProfilestringRead/Write
31) statusorg.sakaiproject.profile2.model.ProfileStatusRead/Write
32) subjectsstringRead/Write
33) universityProfileUrlstringRead/Write
34) userUuidstringRead/Write
35) workphonestringRead/Write

Data and Request Handling

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

Capabilities

NameTypeDescription
1CoreEntityProviderorg.sakaiproject.entitybroker.entityprovider.CoreEntityProvider
2EntityProviderorg.sakaiproject.entitybroker.entityprovider.EntityProvider
3ActionsExecutableorg.sakaiproject.entitybroker.entityprovider.capabilities.ActionsExecutable
4AutoRegisterEntityProviderorg.sakaiproject.entitybroker.entityprovider.capabilities.AutoRegisterEntityProvider
5Describeableorg.sakaiproject.entitybroker.entityprovider.capabilities.Describeable
6Outputableorg.sakaiproject.entitybroker.entityprovider.capabilities.Outputable
7Redirectableorg.sakaiproject.entitybroker.entityprovider.capabilities.Redirectable
8RequestAwareorg.sakaiproject.entitybroker.entityprovider.capabilities.RequestAware
9Resolvableorg.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable
10Sampleableorg.sakaiproject.entitybroker.entityprovider.capabilities.Sampleable

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