Get User Information
Introduction
The endpoint of this service allows to get the user information. since 11.13 A new endpoint allows to handle user preferences.
EndPoints
There are two endpoints:
One to get user information
11.16
GET http://host:port/app/api/rest/whoami
11.12
GET http://host:port/app/api/json/whoami
Legacy endpoint:
http//host:port/app/_plugins/WXM_RESTAPI/page/whoami.jspz
Available method: GET
One to handle preferences
RESTful URIs since 11.14
Â
URI with parameters
Legacy endpoint:
Available methods:
GET
POST, PUT, PATCH
DELETE
Getting user information
Parameters
none
Response format
The whoami action of RESTAPI domain allows the management of the endpoint call authorization. The uniq parameter is:
surfer: surfer
Errors codes
HTTP code | API code | Definition |
---|---|---|
403 | 403/1000 | Forbidden action |
Handle user preferences
Parameters
Common to all methods
namespace: (mandatory) the namespace of preference store to get
key: (mandatory) key identifier of the preference value
name: (optional) identifier of an object that stores the preference if it is not the default storage object. The object must have the tag REST_API_PREF (except default storage object)
Only for POST, PUT and PATCH methods
value: value to set to preference
type: type of the value in the preference store (if it is not mentionned, the value can be evaluated automatically).
Response format
Security
The userpref action of RESTAPI domain allows the management of the endpoint call authorization. There are the following parameters:
surfer: surfer
method: type of access (READ, WRITE or DELETE)
namespace: namespace
key: preference key
name: preference storage object name (could be null)