This web service returns a user's roles. It distinguishes between roles originating from a post-authentication script, those that an administrator has set manually and the default roles configured for the portal.
Method | Endpoint |
---|---|
GET |
|
Path parameter | Type | Description |
---|---|---|
{userId} |
String | The user's identifier. |
Response body
The following lines show an example of a JSON response body:
{
"id": "a43eb18a-3f48-4732-9389-61b540ce9d0d",
"manualRoles": [],
"authenticationRoles": [
"HTML_EXPORT_USER",
"SAVED_SEARCH_USER",
"ADMIN",
"PERSONAL_BOOK_SHARE_USER",
"PERSONAL_BOOK_USER",
"PDF_EXPORT_USER",
"KHUB_ADMIN"
],
"defaultRoles": [
"HTML_EXPORT_USER",
"SAVED_SEARCH_USER",
"PERSONAL_BOOK_USER",
"PDF_EXPORT_USER"
]
}
Field | Type | Description |
---|---|---|
id |
String | The user's identifier. |
manualRoles |
Array | The groups an administrator manually assigned to the user. |
authenticationRoles |
Array | The user groups provided by the post authentication script. |
defaultRoles |
Array | The default roles configured for the portal. |
Return code | Description |
---|---|
200 OK |
The request is valid and returns data. |
401 UNAUTHORIZED |
The authorization header is absent or invalid. |
403 FORBIDDEN |
The user or API key does not have the ADMIN or USERS_ADMIN role. |
404 NOT FOUND |
No user exists with this ID. |
For a comprehensive list of all possible return codes, see Return codes.