User Settings Service
User Settings Service🔗
Updates user's preferences stored in database.
Method saveResults🔗
Method call🔗
saveWithToken(accessToken, userSettings) : boolean
Description🔗
Updates user's language selection which is used for synonym expansion and autocomplete. Only the languages which exist in environment synonym definitions will be accepted. At least one and maximum 5 languages can be enabled.
Parameters🔗
Parameter Name | Type | Description |
---|---|---|
accessToken | string | identifier for the project, may be null for default project |
userSettings | UserSettings | See description of User Settings in chapter Object Structures |
Returns🔗
returns true
if request was successfully applied. In case of error it returns non 200 status code.
Users may configure minimum 1 and maximum 5 languages.
Pre-Condition🔗
- Environment allows user settings to be updated. See
hasUserSettingsEnabled
value in metadata response
Error Handling🔗
Error Code | Description |
---|---|
EMPTY_ARGUMENT | One or more mandatory arguments are empty. |
INVALID_ACTION | User setting modification is not allowed for environment or the request contains languages that are not available for the environment |
INVALID_ACCESS_TOKEN | The token is not valid (possibly timed-out) - applies only to token authentication. |
DATABASE_ERROR | Database communication failed (possibly a misconfiguration issue). |
SEARCH_EXECUTION_ERROR | An error occurred while querying the search index (while retrieving metadata). |