Version: 23.10
POST Update Current User Preferences
Updates/Replaces the portal preferences for the user currently logged in to the portal.
Request
HTTP request
POST https://<JM_SERVER>/workspaces/secure/api/v1/current-user/preferences-update
Request body
The POST request must contain a JSON structure describing the current user preferences update details.
To support multiple parameters this API uses HTTP Content Type: application/json
.
The set of query JSON attributes is listed below. All attributes are optional except where otherwise indicated.
Attribute | Description |
---|---|
params | Map Required. Specify parameters to pass into the update. Must contain only the map "prefs" . |
Within the params
map attribute, "prefs"
are required for updating the current user portal preferences.
Response
If successful, this operation returns a response with a HTTP 200 OK
status code.
Error messages
Error key | Error | HTTP status code |
---|---|---|
currentUserNotFound | Unable to resolve user from request | 400 Bad Request |
internalError | Please see Error Log ID {number} | 500 Internal Server Error |
paramsNotSet | Parameters not specified | 400 Bad Request |
prefsNotSet | New preferences not specified | 400 Bad Request |
unableToResolvePortal | Unable to resolve portal from request | 400 Bad Request |
Error responses
HTTP status code | Description |
---|---|
400 Bad Request | Bad request or request parameter. Check error message for details. |
404 Not Found | Ensure the URL endpoint is entered correctly. |
500 Internal Server Error | Exception occurred in current user preference update. Contact administrator. |
Example
Ensure you specify Content-Type: application/json
.
Example request
POST /workspaces/secure/api/v1/current-user/preferences-update HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json
{
"params": {
"prefs": {
"lastPage": "Help Desk",
"defaultGroup": "CCA Reviewers",
"defaultStartDate": "-30d"
}
}
}