6 USER RESOURCE & REPRESENTATION
The 'user' resource represents the currently logged-in user.
The endpoint URL for this resource is:
/user
6.2 Representation
The links from the user representation to other resources are as shown in the diagram below:
The JSON representation is:
{
"links": [ {
"rel": "self",
"href": "http://~/user",
"type": "application/json;profile=\".../user\"",
"method": "GET"
}, {
"rel": "up",
"href": "http://~/", "type":
"application/json;profile=\".../homepage\"",
"method": "GET"
},
...
],
"userName": "joebloggs",
"friendlyName": "Joe Bloggs",
"email": "joe@bloggs.com",
"roles": [
"role1", "role2", ...
],
"extensions": { ... }
}
where:
JSON-Property | Description |
---|---|
links |
list of links to resources. |
links[rel=self] |
link to a resource that can generate this representation |
links[rel=up] |
link to the homepage resource, §B5. |
userName |
a unique user name friendlyName (optional) the user’s name in a form suitable to be rendered in a UI. |
(optional) the user’s email address, if known roles list of unique role names that apply to this user (may be empty). |
|
extensions |
additional metadata about the resource. |
Restful Objects defines no standard json-properties for "extensions". Implementations are free to add to their own links/json-properties to "links" and "extensions" as they require.